CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - 8x8snake
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - 8x8snake - List
[
SCM
]
8x8snake
DL : 0
8x8点阵做的贪吃蛇游戏 51单片机为主MCU,原理图非常简单,可供初学者更好玩程序-8x8 matrix of the Snake game to do 51 single-chip-based MCU, a very simple schematic for the beginner process more fun
Update
: 2025-02-17
Size
: 420kb
Publisher
:
单机片
[
SCM
]
8x8snake
DL : 0
while(1) {//if(keyenable==1){P1=0x00 P2=0xff }else{P1=0xff P2=0x00 } for(i=3 i<SNAKE+1 i++)x[i]=100 for(i=3 i<SNAKE+1 i++)y[i]=100 //初始化 x[0]=4 y[0]=4 //果子 n=3 //蛇长 n=-1 x[1]=1 y[1]=0 //蛇头 x[2]=0 y[2]=0 //蛇尾1 addx=0 addy=0 //位移偏移 //k=1 while(1){if(keyenable)break timer0(1) } while(1) {timer0(e) if(knock()){e=SPEED break } //判断碰撞 if((x[0]==x[1]+addx)&(y[0]==y[1]+addy)) //是否吃东西-while(1) {//if(keyenable==1){P1=0x00 P2=0xff }else{P1=0xff P2=0x00 } for(i=3 i<SNAKE+1 i++)x[i]=100 for(i=3 i<SNAKE+1 i++)y[i]=100 //初始化 x[0]=4 y[0]=4 //果子 n=3 //蛇长 n=-1 x[1]=1 y[1]=0 //蛇头 x[2]=0 y[2]=0 //蛇尾1 addx=0 addy=0 //位移偏移 //k=1 while(1){if(keyenable)break timer0(1) } while(1) {timer0(e) if(knock()){e=SPEED break } //判断碰撞 if((x[0]==x[1]+addx)&(y[0]==y[1]+addy)) //是否吃东西
Update
: 2025-02-17
Size
: 1kb
Publisher
:
风中云
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.