Darts is a simple game where you want to hit the target ("]") with your dart (">"), while avoiding the obstacles ("^" or "v") in your way. You get one point for each target you hit, and since there are twenty rounds, the maximum number of points is twenty. Although this game is rather simple at its core, it is extremely compact, and a good example of what you can do in a small number of bytes. Like with the other games, try out the game and try to understand and think through the code.

Table of Contents

The Code

:DelVar SFor(I,1,20
:DelVar Ev→C
:Repeat D=16 or max(A=Ans and D=L2
:If Ans=45:Goto Q
:If Ans=21:1→E
:Output(L1(J),L2(J),sub("^ v",2+L3(J),1
:S+(A=B and D=16→S
:Lbl Q

The Download

In case you want to try the program on your calculator, you can download the program in .8xp format.


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License