際際滷

際際滷Share a Scribd company logo
Park Sang
Hyuk
1. 覲 螳
2. WndProc 蠍磯 
螳
3.  る 覦 蟲
覦覯
Snake pt
 player1x, player1y
 player2x, player2y
 foodx[5],foody[5]
 tailx[2][100],taily[2][10
0]
 itemx,itemy;
 snakemap[width][heig
覦一伎
譬螳
 !
蟆 覦一
 tailnum1, tailnum2
 speed1,speed2
 count
 player2on
 playing
 eat
1P 2P 蠎襴 螳
1P 2P 螳螳 

襾轟企ゼ 襾轟 
BOOL 覲
螳螳 れ豺
Snake pt
 煙
螳螳 BMP
殊
覿
覦
蟆
覯

Player1,2 蠎襴 危
襾轟
ID_START
- start()
- foodrandomxy()
- randomxy()
- playing =
TRUE
ID_EXIT
- MessageBox
- DestroyWindo
w
ID_PLAYER1 & ID_PLAYER2
- 1語 player2on = FALSE
- 2語 player2on = TRUE
if(playing == TRUE OR FALSE)
{
stoptimer(Timer ID,FALSE);
SetTimer(hWnd, Timer ID,speed1 OR
speed2,NULL);
SendMessage(hWnd,WM_TIMER, Timer ID,0);
} VK_UP
VK_RIGH
T
VK_DOW
NVK_LEFT
VK_W(0x57)
VK_D(0x44)
VK_S(0x53)VK_A(0x41)
<1語 る慨> <2語 る慨>
!! 襯伎

讌碁!!!
SetTimer()襯 伎
覦
ID螳 伎 讌 
螳  螳  覦覲
貅譯朱 蠍磯
螳螻 蠍襯 
覃伎 豢
覦郁化蠏
襴 豢
prt()
襦
螳覲
企語
豢
KillTimer
Object
DC
Snake pt
豐蠍壱 讌 
 覦一
Start() 
!!
1
1
1
1
1
1
1
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
1
1
1
1
1
1
1
豐蠍壱
 蟆
 覦
伎 覈
player1randomx,y
player2randomx,y
foodrandomx,y
itemrandomx,y
rand()%28 snakemap[width][heig
ht]
0~28
0~28
UP
RIGH
T
DOWN
LEF
T
-襷り覲-
 覦一 譬 螳
Player1 or Player2 豌

Aroundtest
()
Tailfollow()
讌覦レ X,Y譬
襯 覦
讌覦レ 蟲 伎 螳
blank,food,item,wall,tail語襯 蟆
.
Game
over
Game
over
Game
over
1
1
1
1
1
1
1
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
1
1
1
1
1
1
1
For(i=0;i<height;i++)
For(j=0;j<width;j++)
If(i==playerx && j=playery)
Snakemap[i][j]=player1 or player2
2
0 1 2 3 4 5 6
0
Tail[2][7] Tailnum =
7
X0Player1x
Player1y Y0
X1 X2 X3 X4 X5
Y1 Y2 Y3 Y4 Y5
X6
Y6
0 1 2 3 4 5 6
0
New
X0
New
Y0
X0 X1 X2 X3 X4
Y0 Y1 Y2 Y3 Y4
X5
Y5
讌襷 貅
襴郁 
る?
tail!
fol!
low!
1覯 危 : player1  50讀螳/4覯 危 : player2
 50讀螳
2覯 危 : player1 蠎襴 5螳 讀螳/5覯 危 :
player2 蠎襴 5螳 讀螳
3覯 危 : player1 蠎襴 5螳 螳/6覯 危 player2 蠎
襴 5螳 螳
7覯 危 : food 豢螳 
 襦 
襯 覦 
 覯碁ゼ 詞
襷り 覲襦 覦 企┯
襯 誤
覈 企┯襯 覃豢
KillTime
r
1
1
1
1
1
1
1
0
0
0
0
1
1
0
0
0
0
1
1
0
2
4
0
1
1
0
0
0
0
1
1
0
0
0
6
1
1
0
0
0
0
1
1
3
0
0
0
1
1
1
1
1
1
1
For覓語 伎
谿朱
覦一伎 蠏
覦一伎 襷 
 蠏碁殊 豢
譴
企┯襯
覈 KILL

Eat = FALSE
Tailnum = 0
Speed =200
Playing =
FALSE
Snake pt
Snake pt
蟆 讌譴
覦一伎 覈 螳 螳
蠍 殊螻
 襦蠏碁 螳
譬襭
螳  
 .朱  伎 蟆給.
讌讌 蟠豌伎.
^------------^

More Related Content

Snake pt