- Connect 4
- 13 Jun 2014 08:12:27 pm
- Last edited by coolstorybro on 14 Jun 2014 01:27:20 pm; edited 2 times in total
I created a connect 4 for the ti-84 c
Features:
*Movement
*Borders
Future plans:
*Gravity
*To get as close to the real game a possible
I would like if you could give me any suggestions as to what I should implement Into the game
Edit: As per Tifreak's suggestion, I got rid of the Lbl and Goto commands
Code:
As of now if you, while moving, go over a piece it will erase that piece.
Features:
*Movement
*Borders
Future plans:
*Gravity
*To get as close to the real game a possible
I would like if you could give me any suggestions as to what I should implement Into the game
Edit: As per Tifreak's suggestion, I got rid of the Lbl and Goto commands
Code:
ClrDraw
RecallGDB 1 //GDB 1 is blank
AxesOff
0->Xmin
7->Xmax
0->Ymin
7->Ymax
0->A
For(Z,0,7
Line(Z,0,Z,7
Line(0,Z,7,Z
End
0->Z
1->B
1->C
While B=1
14->X
5->Y
3(C=2->C
While C=1
Text(Y,X,"X
Repeat A
getkey ->A
End
If A!=105
Then
Text(Y,X," "//or just 4 spaces
If A=24
Then
X-38->X
X+38(X<14->X
End
If A=25
Then
Y-23->Y
Y+23(Y<5->Y
End
If A=26
Then
X+38->X
X-38(X>260->X
End
If A=34
Then
Y+23->Y
Y-23(Y>160->Y
End
0->A
End
If A=105
Then
0->A
2->C
14->X
5->Y
End
End
While C=3
Text(Y,X,"O
Repeat A
getkey ->A
End
If A!=105
Then
Text(Y,X," "//or just 4 spaces
If A=24
Then
X-38->X
X+38(X<14->X
End
If A=25
Then
Y-23->Y
Y+23(Y<5->Y
End
If A=26
Then
X+38->X
X-38(X>260->X
End
If A=34
Then
Y+23->Y
Y-23(Y>160->Y
End
0->A
End
If A=105
Then
0->A
14->X
5->Y
1->C
End
End
End
As of now if you, while moving, go over a piece it will erase that piece.