Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "OX"→Str 1
- Do
- ClrText
- {3,3→Dim Mat A
- 1→J
- 0→Z
- "You choose ?"
- " 1. O"
- " 2. X"
- Do
- Getkey
- LpWhile Ans≠72 And Ans≠62
- If Ans=72
- Then 0→I
- Else 1→I
- IfEnd
- ClrText
- Locate 10,2,"| |"
- Locate 9,3,"-+-+-"
- Locate 10,4,"| |"
- Locate 9,5,"-+-+-"
- Locate 10,6,"| |"
- 0→Z
- Do
- Do
- Do
- Getkey→K
- LpWhile Not K
- 1-J→J
- 0
- K=72⇒1:K=62⇒2:K=52⇒3
- K=73⇒4:K=63⇒5:K=53⇒6
- K=74⇒7:K=64⇒8:K=54⇒9
- LpWhile Not Ans
- Ans→B
- 1+Int ((B-1)Á3→E
- 1+3Frac ((B-1)Á3→F
- If Not Mat A[E,F
- Then I+1→Mat A[E,F
- Locate 7+2F,8-2E,StrMid(Str 1,I+1,1)
- 1-I→I
- Isz Z
- IfEnd
- 0→G
- For 1→B To 3
- Mat A[B,1⇒Mat A[B,1]=Mat A[B,2] And Mat A[B,1]=Mat A[B,3⇒1→G
- Next
- For 1→B To 3
- Mat A[1,B⇒Mat A[1,B]=Mat A[2,B] And Mat A[1,B]=Mat A[3,B⇒1→G
- Next
- Mat A[2,2⇒(Mat A[2,2]=Mat A[1,1])(Mat A[3,3]=Mat A[1,1])+(Mat A[1,3]=Mat A[2,2])(Mat A[1,3]=Mat A[3,1⇒1→G
- LpWhile Not G And Z<9
- ClrText
- If G=1
- Then "Player win !"
- Locate 8,1,J+1
- Else "Ex-aequo !"
- IfEnd
- "Play again (1=yes)"?→B
- LpWhile B=1
- =====================================================
- Totoyo - www.planet-casio.com
- Follow me on Youtube : http://youtu.be/pamqtqJcW5M
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement