Fix the bcom on the client side. Lobby side still a problem
- Can't use bcom in callbacks
This commit is contained in:
parent
87c6ae831a
commit
610e09b2a6
2 changed files with 5 additions and 3 deletions
|
@ -34,5 +34,6 @@
|
|||
(begin
|
||||
(board-choose! board mark x y)
|
||||
(set! my-turn? (not my-turn?))
|
||||
(display))
|
||||
(display)
|
||||
(<- peer 'peer-turn! x y))
|
||||
(error "It's not my turn."))]))
|
||||
|
|
|
@ -63,8 +63,9 @@
|
|||
(define won? (rps-winner pick peer-pick))
|
||||
(format #t "Peer picked ~a... a bold choice (do I win? ~a), I will become a controller and send my unsealer.\n" peer-pick won?)
|
||||
;; We make the assumption that lobby is to become a controller.
|
||||
(bcom (^game-controller bcom won? lobby))
|
||||
unseal-pick]))
|
||||
;; Note second arg to bcom which will return the value (this is confusing to me)
|
||||
;; see https://spritely.institute/files/docs/guile-goblins/0.11.0/Object-construction.html
|
||||
(bcom (^game-controller bcom won? lobby) unseal-pick)]))
|
||||
|
||||
;;
|
||||
;; Standard rock paper scissors logic follows!
|
||||
|
|
Loading…
Reference in a new issue