# Comment: -> is the STO command, >= is the greater than or equal sign (≥), <= is the less than or equal sign (≤), and != is the not equal sign (≠).
# SopaXorzTaker, 2016
# Good luck typing that in (or use the TI utility if you have a link cable).
0->A
1->B
3->C
1->D
0->E
0->F
25->G
0->K
ClrHome
Output(1,2,"SCORE
Output(2,2,0
Output(3,2,"LIVES
Output(4,2,3
Output(7,9,"V
Repeat K=45 or C<0 or A>=15000 or G<0
If A!=E
Then
Output(2,2," "
Output(2,2,A
End
If C!=F
Then
Output(4,2," "
Output(4,2,C
End
Output(8,1,"................
Output(8,B,"X
A->E
C->F
getKey->K
If K=105
Then
25->G
If B=9
Then
A+100->A
If rand>.75
A+150->A
If fPart (A/1000)=0
Then
A+250->A
C+1->C
Output(2,7,"1 UP!
For(I,1,50
End
Output(2,7," "
Output(1,7,"1 UP!
For(I,1,50
End
Output(1,7," "
End
Else
A-150->A
C-1->C
Output(5,2,"MISS!
For(I,1,50
End
Output(5,2," "
Output(6,2,"MISS!
For(I,1,50
End
Output(6,2," "
End
For(I,1,10
End
B+D->B
If B>16
Then
16->B
0-D->D
End
If B<1
Then
1->B
0-D->D
End
G-1->G
End
If C<0 or G<0
Then
Output(7,1," "
Output(8,1,"YOU LOSE! "
Pause
End
If A>=15000
Then
Output(2,2,A
Output(7,1," "
Output(8,1,"YOU WIN! "
Pause
End
ClrHome
Is there any chance of the program or a screenshot? (IDK how possible such things for the 82 are...)
Anyhow, i'd recommend leaving away the trailing quotes on your output lines, this way you save bytes!
Also, any reason why there are so many spaces after "YOU LOSE!" and "YOU WIN!" ?
0->A
1->B
3->C
1->D
0->E
0->F
25->G
ClrHome
Output(1,2,"SCORE
Output(2,2,0
Output(3,2,"LIVES
Output(4,2,3
Output(7,9,"V
Just declarations and display stuff (stuff that won't change during the program)Repeat K=45 or C<0 or A>15000 or G<0
Main loopthat got 3 possible criterias to stop:If A!=E
Then
Output(2,2," "
Output(2,2,A
End
If C!=F
Then
Output(4,2," "
Output(4,2,C
End
Checks for changes in both lives and score. That's fine but is it really necessary? ^^ You could also just update this every round ^^ (but that might make the screen flicker a bit so just leave it like that)Output(8,1,"................
Output(8,B,"X
A->E
C->F
Display the ground and the "cursor", fine.getKey->K
If K=105
Then
The kay was pressed, will now check if you missed or not25->G
Set number of tries to 25, okIf B=9
Then
A+100->A
A perfect hit I guess...If rand>.75
A+150->A
Additional points depending on luckIf fPart (A/1000)=0
Then
A+250->A
C+1->C
Output(2,7,"1 UP!
For(I,1,50
End
Output(2,7," "
Output(1,7,"1 UP!
For(I,1,50
End
Output(1,7," "
End
Score divisible by 1000: 1upElse
A-150->A
C-1->C
Output(5,2,"MISS!
For(I,1,50
End
Output(5,2," "
Output(6,2,"MISS!
For(I,1,50
Output(6,2," "
End
End
Code part if you didnt perfectly hit itFor(I,1,10
End
Another little delayB+D->B
Move the target again (speed and direction=D)If B>16
Then
16->B
0-D->D
End
Mustn't leace screen on the left sideIf B<1
Then
1->B
0-D->D
End
Mustn't leace screen on the right sideG-1->G
You should put G-1->G into the two conditions above (leaving screen) instead of putting it here :) Else You won't have 25 chanzes - it's more like the target is gonna move a total of 25 times... (here the counter for left tries (G) gets reduced by 1 EVERY round no matter if it touched the borders or not, that's what you could call a bug) :)End
End the conditioned block for Key is pressedIf C<0 or G<0
Then
Output(7,1," "
Output(8,1,"YOU LOSE! "
Pause
End
I lost... :(If A>15000
Then
Output(2,2,A
Output(7,1," "
Output(8,1,"YOU WIN! "
Pause
End
Same as before: This is triggered at 15001 instead of 15000, use >= here or simply use 14999 instead :)ClrHome
ok, program is going to endSpeed | how B changes |
1 | 1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16-16-15-14-13-12-11-10-9-8-7-6-5-4-3-2-1-1-2-... |
2 | 1-3-5-7-9-11-13-15-16-14-12-10-8-6-4-2-1-3-... |
3 | 1-4-7-10-13-16-16-13-10-7-4-1-1-4-... |
dont forget the G-1->G or your program should end after 2 tries if you dont press key ;) (at least I think so ^^)You already have a 25 step timeout, which I believe to be more than enough (I was able to complete this game :))
As in the Str part, TI-82 does not support string manipulation :(didnt know that since I dont have a TI-82 sorry :/