snake_src.htm

来自「很小的程序 在arm上面可以运行的嵌入式的贪吃蛇游戏 网上找到的:)」· HTM 代码 · 共 751 行 · 第 1/5 页

HTM
751
字号
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">&nbsp;<o:p>
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">U8      
HeadDirect; //the direction of the headpoint move toward<o:p>     
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">U8    
EndDirect;<span style="mso-spacerun: yes; font-size: 10.0pt; font-family: 宋体; mso-hansi-font-family: Times New Roman; mso-font-kerning: 0pt">&nbsp; </span>//the direction of the      
endpoint<span style="mso-spacerun: yes">&nbsp; </span>move toward<o:p>     
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">&nbsp;<o:p>
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">U8      
ChangePointPos[10][2];<span style="mso-spacerun: yes">&nbsp; </span>//the      
position<span style="mso-spacerun: yes">&nbsp; </span>of the change point<o:p>     
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">U8      
ChangePointDirect[10];<span style="mso-spacerun: yes; font-size: 10.0pt; font-family: 宋体; mso-hansi-font-family: Times New Roman; mso-font-kerning: 0pt">&nbsp; </span>//the      
direction of the change point<o:p>     
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">U8    
ChangePointCount;<span style="mso-spacerun: yes; font-size: 10.0pt; font-family: 宋体; mso-hansi-font-family: Times New Roman; mso-font-kerning: 0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
</span>//the number<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>of      
the change point<o:p>     
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">&nbsp;<o:p>
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">u8      
addcount=0;//after eat bean,the length to be added<o:p>     
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">&nbsp;<o:p>
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">//定义界面左边蛇在其中游动的矩形和界面右边的矩形   
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">structRECT      
snakeRect, rightRect;<o:p>     
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">structRECT  
*psnakeRect, *prightRect;<o:p> 
</o:p> 
</font></strong></b>
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">&nbsp;<o:p>
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">structRECT      
barRect1, barRect2;<o:p>     
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">structRECT  
*pbarRect1, *pbarRect2;<o:p> 
</o:p> 
</font></strong></b>
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">&nbsp;<o:p>
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">//定义以5个象素为单位的坐标系统中两个栅栏的矩形   
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">structRECT      
barRect1_5, barRect2_5;<o:p>     
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">structRECT  
*pbarRect1_5, *pbarRect2_5;<o:p> 
</o:p> 
</font></strong></b>
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">&nbsp;<o:p>
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">&nbsp;<o:p>
</o:p> 
</font></strong></b>
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">BOOLEAN    
gameover,pause,gamepass;<o:p>
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">BOOLEAN  
catch;<o:p>
</o:p> 
</font></strong></b>
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">&nbsp;<o:p>
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">BOOLEAN      
initfinished;<o:p>
</o:p>     
</font></strong></b> 
</span></p>
<p class="MsoNormal" align="left" style="text-align: left; mso-layout-grid-align: none; text-autospace: none; word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.0pt;font-family:
宋体;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:0pt"><b><strong><font size="2">&nbsp;<o:p>
</o:p>     
</font></strong></b> 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?