Đấm nhau
-
' GAME RẮN SĂN MỒI - CASIO fx-5800P
ClrText
RanInt#(1,16)→X: RanInt#(1,4)→Y
RanInt#(2,15)→A: RanInt#(2,3)→B
2→DimZ: 1→C: 0→D
Lbl 1: ClrText
Locate A,B,"*"
For 1→I To C
Locate List 1[I],List 2[I],"O"
Next
Getkey→K
If K=25 And D≠1 Then 0→D: Goto 2
If K=26 And D≠0 Then 1→D: Goto 2
If K=24 And D≠3 Then 2→D: Goto 2
If K=23 And D≠2 Then 3→D: Goto 2
Lbl 2
If D=0 Then Y-1→Y
If D=1 Then Y+1→Y
If D=2 Then X-1→X
If D=3 Then X+1→X
If X<1 Or X>16 Or Y<1 Or Y>4 Then Goto 3
For 1→I To C
If X=List 1[I] And Y=List 2[I] Then Goto 3
Next
X→List 1[1+C]: Y→List 2[1+C]
If X=A And Y=B Then C+1→C: RanInt#(1,16)→A: RanInt#(1,4)→B
For C→I To 2 Step -1
List 1[I-1]→List 1[I]
List 2[I-1]→List 2[I]
Next
Goto 1
Lbl 3: ClrText: "KẾT THÚC": "ĐIỂM:"
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login