clean up, add some doc comments

This commit is contained in:
Nico 2021-03-17 12:01:30 +00:00
parent bb945d1039
commit 84ac31c550
1 changed files with 6 additions and 5 deletions

11
main.fs
View File

@ -5,13 +5,14 @@
\ the variable "counter" holds the count of the current tick. It always starts at 0.
variable counter
\ game tick. Pretty much 1/60th of a second.
\ the word tick waits a game tick. Pretty much 1/60th of a second.
: tick 16 ms ;
: tick-up tick 1 counter +! ; \ tick the counter up
\ the word tick-up ticks the counter up
: tick-up tick 1 counter +! ;
\ TODO cleanup, saving
: exit-game bye ;
: exit-game bye ;
: handle-input
key? if key case
@ -19,10 +20,10 @@ variable counter
endcase then ;
\ TODO this is a stub
: draw-screen counter @ . ;
: draw-screen counter @ . ;
\ main game loop
: game-loop begin tick-up handle-input draw-screen 0 until ;
: game-loop begin tick-up handle-input draw-screen 0 until ;
\ clear the screen and start the game
page game-loop