0 Members and 2 Guests are viewing this topic.
MAINLOOP:Disp "WILL YOU MOVE:Input "FIRST? Y/N: ",Str1:Str1≠"Y→T:{6,7→dim([A]:Fill 0,[A]:ClrHome:For(A,2,7:Output(A,2,". . . . . . .:End:Output(8,2,"-------------:Repeat W:If T:Then:Repeat not([A](1,Ans:randInt(1,7→C:End:prgmGRAVITY:Else:DelVar M4→C:Repeat M:Output(1,2C,"V:Repeat max(K={21,24,26,45:getKey→K:End:If K=45:Return:If K=21 and not([A](1,C:Then:prgmGRAVITY:1→M:Output(1,2C," :End:If K≠21:Then:Output(1,2C," :C-25+Ans→C:Ans-7(Ans=8)+7not(Ans→C:End:End:End:{1,1,1,1→{L1}:T+1→T:1→A:While A<4 and R+A≤6 and Ans:If T=[A](R+A,C:Then:1+{L1}(1→{L1}(1:A+1→A:Else:0:End:End:1→A:While A<4 and C-A≥1 and Ans:If T=[A](R,C-A:Then:1+{L1}(2→{L1}(2:A+1→A:Else:0:End:End:1→A:While A<4 and C+A≤7 and Ans:If T=[A](R,C+A:Then:1+{L1}(2→{L1}(2:A+1→A:Else:0:End:End:1→A:While A<4 and R+A≤6 and C+A≤7 and Ans:If T=[A](R+A,C+A:Then:1+{L1}(3→{L1}(3:A+1→A:Else:0:End:End:1→A:While A<4 and R-A≥1 and C-A≥1 and Ans:If T=[A](R-A,C-A:Then:1+{L1}(3→{L1}(3:A+1→A:Else:0:End:End:1→A:While A<4 and R+A≤6 and C-A≥1 and Ans:If T=[A](R+A,C-A:Then:1+{L1}(4→{L1}(4:A+1→A:Else:0:End:End:1→A:While A<4 and R-A≥1 and C+A≤7 and Ans:If T=[A](R-A,C+A:Then:1+{L1}(4→{L1}(4:A+1→A:Else:0:End:End:max(3<{L1}→W:not(T-1→T:EndGRAVITY:DelVar RR:Repeat Ans=5 or [A](Ans+1,C:Ans+1:End:Ans+(Ans=5 and not([A](6,C→R:T+1→[A](Ans,C:Output(R+1,2C,sub("XO",T+1,1
:Disp "WILL YOU MOVE:Input "FIRST? Y/N: ",Str1:Str1≠"Y→T:{6,7→dim([A]:Fill 0,[A]:ClrHome:For(A,2,7:Output(A,2,". . . . . . .:End:Output(8,2,"-------------:DelVar URepeat W or U=42:If T:Then:Repeat not([A](1,Ans:randInt(1,7→C:End:prgmZG:Else:DelVar M4→C:Repeat M:Output(1,2C,"V:Repeat max(K={21,24,26,45:getKey→K:End:If K=45:Return:If K=21 and not([A](1,C:Then:prgmZG:1→M:Output(1,2C," :End:If K≠21:Then:Output(1,2C," :C-25+Ans→C:Ans-7(Ans=8)+7not(Ans→C:End:End:End:{1,1,1,1→L1:T+1→T:1→A:While A<4 and R+A≤6 and Ans:If T=[A](R+A,C:Then:1+L1(1→L1(1:A+1→A:Else:0:End:End:1→A:While A<4 and C-A≥1 and Ans:If T=[A](R,C-A:Then:1+L1(2→L1(2:A+1→A:Else:0:End:End:1→A:While A<4 and C+A≤7 and Ans:If T=[A](R,C+A:Then:1+L1(2→L1(2:A+1→A:Else:0:End:End:1→A:While A<4 and R+A≤6 and C+A≤7 and Ans:If T=[A](R+A,C+A:Then:1+L1(3→L1(3:A+1→A:Else:0:End:End:1→A:While A<4 and R-A≥1 and C-A≥1 and Ans:If T=[A](R-A,C-A:Then:1+L1(3→L1(3:A+1→A:Else:0:End:End:1→A:While A<4 and R+A≤6 and C-A≥1 and Ans:If T=[A](R+A,C-A:Then:1+L1(4→L1(4:A+1→A:Else:0:End:End:1→A:While A<4 and R-A≥1 and C+A≤7 and Ans:If T=[A](R-A,C+A:Then:1+L1(4→L1(4:A+1→A:Else:0:End:End:max(3<L1→W:not(T-1→T:U+1→U:End:ClrHome:If Ans≠42 and W:Then:Disp "YOU "+sub("LOSEWIN!",4T+1,4:Else:"TIED GAME
:DelVar RR:Repeat Ans=5 or [A](Ans+1,C:Ans+1:End:Ans+(Ans=5 and not([A](6,C→R:T+1→[A](Ans,C:Output(R+1,2C,sub("XO",T+1,1