Fix, and actually seed random state again

This commit is contained in:
Vivianne 2023-07-16 20:11:13 -07:00
parent 36ff5f887c
commit 910556a7af
2 changed files with 6 additions and 3 deletions

View File

@ -23,9 +23,10 @@
(syscaller-free-fiber (λ () (put-message state+ (%state))))
#f)
(define (switch-turn!)
($ %my-turn? (not %my-turn?))
(when ($ %my-turn?) (signal-turn))
#f)
(let ((new-turn (not ($ %my-turn?))))
($ %my-turn? new-turn)
(when new-turn (signal-turn))
#f))
(when first? (signal-turn))
(methods
;; The peer is telling us about the turn it took.

View File

@ -15,6 +15,8 @@
#:use-module (goblins ocapn netlayer onion)
#:export (make-initiator make-joiner))
(random-state-from-platform)
;; Module for simple console-based UI (no curses)
;; A single run of the loop for a bespoke REPL for playing the game