0->C:-1->D
3->A:5->B
ClrHome
Disp "================
For(F,1,5
Disp "](
End
Disp "================
Output(8,1,"[SCORE : ]
While 1
D+1->D
Output(B,15," '2 spaces
B=6 or B=2
If ans=0
randInt(-1,1)+B
If ans=1:Then
B+(B=2)->B
B+(B=6)->B
End
Output(B,15,"{}
Repeat k=25 or k=34
getKey->K
If Ans
Output(A,2,"(
min(6,max(2,A+sum(🔼list(K={25,34->A
Output(8,8,C
Output(8,13,D
Output(A,2,"{*
If k=105:then
Output(A,4,"-------------
AFor(F,1,20
End
Output(A,4," '13 spaces
If A=B:then
randInt(2,6->B
C+1->C
End
End
End
End
The game is pretty simple. You are a "laser" on the left end of the tunnel. The target moves and you have to hit it. It may sound simple, but it can be quite hard. The target only moves when you do, and there is no way of knowing where it will go. You have to do a lot of guessing to position yourself correctly. I could've just said that this game is turn based, but it makes it seem cooler when I spend forever hyping it up. Once the laser is lined up with the target, press enter to fire. Once it the target is destroyed it will teleport to a random location. (it will not do this until you move). Firing the laser does not count as a move, so just hitting enter won't make the target move. The score a the bottom of the screen is divide in to two parts: the number of hits compared to the number of moves. The object over the game it to keep the ratio as close to x:x as possible.
Does anyone have any ideas to make the concept of the game or the code better? Are there any issues with the code?
JOIN THE SEUSCPC TODAY
South Eastern United States Calculator Programming Club
A Proud Supporter of The Ti BASIC Community