Pong scorekeeper

Trenly 03 Nov 2014 16:52

I want to add a score keeping function to this so it displays how many times you have bounced the ball while playing. Here is my current code:

```
5→A:4→X
1→S;1→T
randInt(1,8→Y
Repeat K=105 or X=1 and A≠Y
ClrHome
Output(A,1,"I"
Output(Y,X,"O"
getKey→K
max(1,min(8,A+(Ans=34)-(Ans=25→A
T(Y>1 and Y<8)+(Y=1)-(Y=8→T
S(X>1 and X<16)+(X=1)-(X=16→S
X+Ans->X:Y+T→Y
End
Output(1,1,"GAME OVER!"
Pause
ClrHome
Return
```

Posted on mobile.