预览加载中,请您耐心等待几秒...
1/9
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9
在线预览结束,喜欢就下载吧,查找使用更方便
如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
OptionExplicitDimcpost%,cposl%,nowpost%,nowposl%,changet%,changel%,medium%,forno1%,forno2%,no(1To9)AsInteger,steps%,timecount%,score%Dimcheckwhetherdisorder%,checkdisordering%,disorderno%,continuedisorderSubcheckcommand()If(Command1.Top=0)And(Command1.Left=0)_And(Command2.Top=0)And(Command2.Left=2000)_And(Command3.Top=0)And(Command3.Left=4000)_And(Command4.Top=2000)And(Command4.Left=0)_And(Command5.Top=2000)And(Command5.Left=2000)_And(Command6.Top=2000)And(Command6.Left=4000)_And(Command7.Top=4000)And(Command7.Left=0)_And(Command8.Top=4000)And(Command8.Left=2000)_And(recognize.Top=4000)And(recognize.Left=4000)ThenTimer1.Interval=0Ifcheckdisordering=1ThenGoToline1MsgBox("恭喜你已经解出了正确的顺序")score=500-steps-timecountMsgBox("您本次的得分为"&Str(score))checkwhetherdisorder=0line1:EndIfEndSubPrivateSubForm_Activate()MsgBox("如果你已经了解规则,请点击关闭游戏规则")start.Enabled=FalseEndSubPrivateSubform_Load()changet=0changel=0steps=0timecount=0score=0checkwhetherdisorder=0Callorders_Clickcheckdisordering=0EndSubPrivateSubCommand1_Click()If(checkwhetherdisorder=0)Or(Picture2.Visible=True)ThenGoToline0cpost=recognize.Topcposl=recognize.Leftnowpost=Command1.Topnowposl=Command1.LeftIfAbs(cpost-nowpost)=2000Thenchanget=1IfAbs(cposl-nowposl)=2000Thenchangel=1If((Abs(cpost-nowpost)=2000)And(Abs(cposl-nowposl)=4000))Or((Abs(cpost-nowpost)=4000)And(Abs(cposl-nowposl)=2000))Thenchanget=0changel=0EndIfmedium=cpostcpost=nowpostnowpost=mediummedium=cposlcposl=nowposlnowposl=mediumIfchanget+changel=1ThenCommand1.Movenowposl,nowpostrecognize.Movecposl,cpoststeps=steps+1stepsdisplay.Clsstepsdisplay.Print"已进行步数";stepsEndIfchanget=0changel=0Timer1.Interval=1000checkcommandline0:IfPicture2.Visible=TrueThenMsgBox("点击关闭游戏规以开始游戏")EndSubPrivateSubCommand2_Click()If(checkwhetherdisorder=0)Or(Picture2.Visible=True)ThenGoToline0cpost=recognize.Topcposl=recognize.Leftnowpost=Command2.Topnowposl=Command2.LeftIfAbs(cpost-nowpost)=2000Thenchanget=1IfA