use ESC to restart game, update README

This commit is contained in:
~d6 2024-07-28 00:47:43 -04:00
parent c6f9e03cbe
commit 13dab7c80d
3 changed files with 14 additions and 3 deletions

View File

@ -4,6 +4,13 @@
![screenshot of initial solitaire deal](start.png)
## controls
- Use the mouse to move the pointer
- Click to pick up cards; click again to drop them
- Press *Esc* to restart the game
- Press *Return* to print internal game state
## details
Currently *Kodiak* is very limited:

Binary file not shown.

View File

@ -58,12 +58,15 @@
#0100 .Screen/w DEO2
#00c0 .Screen/h DEO2
reset BRK
@reset
init-rng-from-datetime
init-stock
.waste #18 initialize
.foundation #04 initialize
.tableau #85 initialize
.held #0d initialize
.held #02 initialize
.dragging #05 initialize
.prev #06 initialize
@ -79,7 +82,7 @@
draw
;on-mouse .Mouse/vect DEO2
;on-key .Controller/vect DEO2
BRK
JMP2r
@dump-byte ( byte^ -- )
DUP #04 SFT ,&hex JSR #0f AND ,&hex JMP
@ -578,7 +581,8 @@
&start POP !draw-cards )
@on-press ( -> )
.Controller/key DEI #0d NEQ ?{ dump-state JMP2r }
.Controller/key DEI #0d EQU ?dump-state
.Controller/key DEI #1b EQU ?reset
JMP2r
( .Controller/button DEI ( button^ )
.prev/button LDZ #ff EOR AND ( press^ )