際際滷
Submit Search
Snake pt
Download as PPTX, PDF
0 likes
362 views
覦
Follow
1 of 29
Download now
Download to read offline
More Related Content
Snake pt
1.
Park Sang Hyuk
2.
1. 覲 螳 2.
WndProc 蠍磯 螳 3. る 覦 蟲 覦覯
4.
player1x, player1y
player2x, player2y foodx[5],foody[5] tailx[2][100],taily[2][10 0] itemx,itemy; snakemap[width][heig 覦一伎 譬螳 ! 蟆 覦一
5.
tailnum1, tailnum2
speed1,speed2 count player2on playing eat 1P 2P 蠎襴 螳 1P 2P 螳螳 襾轟企ゼ 襾轟 BOOL 覲 螳螳 れ豺
7.
煙 螳螳 BMP 殊 覿 覦 蟆 覯 Player1,2
蠎襴 危 襾轟
8.
ID_START - start() - foodrandomxy() -
randomxy() - playing = TRUE ID_EXIT - MessageBox - DestroyWindo w ID_PLAYER1 & ID_PLAYER2 - 1語 player2on = FALSE - 2語 player2on = TRUE
9.
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語 る慨>
10.
!! 襯伎 讌碁!!! SetTimer()襯 伎 覦 ID螳
伎 讌 螳 螳 覦覲 貅譯朱 蠍磯
11.
螳螻 蠍襯 覃伎
豢 覦郁化蠏 襴 豢 prt() 襦 螳覲 企語 豢
12.
KillTimer Object DC
14.
豐蠍壱 讌
覦一 Start() !!
15.
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 豐蠍壱 蟆 覦 伎
覈
16.
player1randomx,y player2randomx,y foodrandomx,y itemrandomx,y rand()%28 snakemap[width][heig ht] 0~28 0~28
17.
UP RIGH T DOWN LEF T -襷り覲- 覦一 譬
螳 Player1 or Player2 豌 Aroundtest () Tailfollow()
18.
讌覦レ X,Y譬 襯 覦 讌覦レ
蟲 伎 螳 blank,food,item,wall,tail語襯 蟆 .
19.
Game over Game over Game over
20.
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
21.
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!
22.
1覯 危 :
player1 50讀螳/4覯 危 : player2 50讀螳 2覯 危 : player1 蠎襴 5螳 讀螳/5覯 危 : player2 蠎襴 5螳 讀螳 3覯 危 : player1 蠎襴 5螳 螳/6覯 危 player2 蠎 襴 5螳 螳 7覯 危 : food 豢螳 襦 襯 覦 覯碁ゼ 詞
23.
襷り 覲襦 覦
企┯ 襯 誤 覈 企┯襯 覃豢 KillTime r
24.
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覓語 伎 谿朱 覦一伎 蠏 覦一伎
襷 蠏碁殊 豢
25.
譴 企┯襯 覈 KILL Eat =
FALSE Tailnum = 0 Speed =200 Playing = FALSE
28.
蟆 讌譴 覦一伎 覈
螳 螳 蠍 殊螻 襦蠏碁 螳 譬襭
29.
螳
.朱 伎 蟆給. 讌讌 蟠豌伎. ^------------^
Download