1辽宁省沈阳市第十五中学2013年高中数学论文图形计算器应用能力测试活动学生打地鼠的改进早就知道CLASSPAD330上可以用program来玩打地鼠游戏了,现在改进了一下打地鼠的游戏,使之更有趣味。首先,先介绍一下地鼠的画法打开graphandtable,画出r=0.75的圆打开viewwindow改成如图,然后按graphformat,2改成,就是去掉坐标轴然后画-^42.5yx=+其中-0.650.65x#点击下方图片使用analysis,sketch,text,然后就可以用文字装饰地鼠了3效果如下最后储存图片storepicture,因为这个地鼠底下的椭圆在键盘1的位置,所以保存为pic1文件同理通过改变viewwindow,改变x,y的范围(什么-1,5或-5,1的等等)画完1——9号地鼠(样子都可以不一样哦),保存再在屏幕中央画一个大boss,如图所示保存为boss。还可以画一幅打地鼠的开机图片,保存为open。接下来是程序时间程序部分很多由庄哲同学指导完成,在此感谢庄哲的帮助Clear_a_z0Þz(次数变量)0Þa0Þt(时间变量)10Þrty(任意的变量)-1ÞgClrGraph4ViewWindow-8,8,1,-8,8,1RclPictopen(打开open文件)0Þyui(任意变量)PrintNaturalghj(最高分变量),“HighScore”Inputcv,“Clear?1=yes,0=no”DispTextIfcv=1Then0ÞghjLblstarCls0Þx0Þyg+1ÞgRand(-1,1)Þs(任意)Rand(-1,1)Þd(任意)0Þu(任意)Ifz=10Then5Þrty5Þnc(个数变量)Message”Lv.1passedandHITTHEBOSS!”GotobossElseifz=25Then4Þrty10ÞncMessage”Lv.2passedandHITTHEBOSS!”GotobossElseifz=55Then3Þrty15ÞncMessage”Lv.3passedandHITTHEBOSS!”GotobossElseifz=125Then2Þrty20ÞncMessage”Lv.4passedandHITTHEBOSS!”GotobossElseifz=325Then51Þrty30ÞncMessage”Lv.5passedandHITTHEBOSS!”GotobossIfendGotonorLblbossRclPictbossLbln0Þx0Þy0ÞuWhile(x=0andy=0)and(u1)u+1Þut+1ÞtPrintrty-uGetPenx,yWhileEndIfx³60andx£122andy³162andy£211andnc³0Thennc-1Þncz+1ÞzGotonIfend0Þz0Þy0ÞuClsLblnor5+s+3dÞkIfk=1ThenRclPictpic1Elseifk=2ThenRclPictpic2Elseifk=3ThenRclPictpic3Elseifk=4ThenRclPictpic4Elseifk=56ThenRclPictpic5Elseifk=6ThenRclPictpic6Elseifk=7ThenRclPictpic7Elseifk=8ThenRclPictpic8Elseifk=9ThenRclPictpic9IfendWhile(x=0andy=0)and(urty)u+1Þut+1ÞtPrintrty-uGetPenx,yWhileEndIfx³4andx£39andy³134andy£152Then7ÞaIfendIfx³63andx£97andy³134andy£152Then8ÞaIfendIfx³119andx£155andy³134andy£152Then9ÞaIfendIfx³4andx£39andy³163andy£184Then4ÞaIfendIfx³63andx£97andy³163andy£184Then5ÞaIfendIfx³119andx£155andy³163andy£184Then6Þa7IfendIfx³4andx£39andy³191andy£209Then1ÞaIfendIfx³63andx£97andy³191andy£209Then2ÞaIfendIfx³119andx£155andy³191andy£209Then3ÞaIfendIfa=5+s+3dThenz+1ÞzGotostarIfendIfz£ghjThenPrintNaturalz,”yourscore”PrintNaturalt,”yourtime”ElsePrintNaturalz,”Highscore!yourscore”PrintNaturalt,”yourtime”zÞghjIfend这样就可以运行打地鼠的程序了,一共5关,每关地鼠数量指数增加,速度也加快,每关后都有一个boss可以连击,不过不打也可以。程序最终运行情况可以到我CLASSPAD上看,效果还不错。1502屠若文2013.6.11