forked from vv/gib-gab-gob
Switch to ~a to avoid quotes in name.
This commit is contained in:
parent
efe8e786c3
commit
aa89fc61a9
|
@ -13,7 +13,7 @@
|
|||
(format #t "Hey there, ~a! You sent me your pick of rock-paper-scissors; now I will send mine.\n" name)
|
||||
(on (<- (<- client 'pick->unsealer pick) sealed-pick)
|
||||
(lambda (peer-pick)
|
||||
(format #t "Opponent ~s has picked ~a (do I win? ~s)\n" name peer-pick (rps-winner pick peer-pick))))]))
|
||||
(format #t "Opponent ~a has picked ~a (do I win? ~a)\n" name peer-pick (rps-winner pick peer-pick))))]))
|
||||
|
||||
(define (^client-picker bcom)
|
||||
(define-values (seal-pick unseal-pick my-pick?)
|
||||
|
@ -22,5 +22,5 @@
|
|||
(methods
|
||||
[(get-sealed-pick) ($ seal-pick pick)]
|
||||
[(pick->unsealer peer-pick)
|
||||
(format #t "Peer picked ~a... a bold choice (do I win? ~s), I will send my unsealer\n" peer-pick (rps-winner pick peer-pick))
|
||||
(format #t "Peer picked ~a... a bold choice (do I win? ~a), I will send my unsealer\n" peer-pick (rps-winner pick peer-pick))
|
||||
unseal-pick]))
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
(define client-picker (spawn ^client-picker))
|
||||
(on (<- (lobby client) 'register-opponent user-name client-picker ($ client-picker 'get-sealed-pick))
|
||||
(lambda (_)
|
||||
(format #t "~s finished the game.\n" user-name)))))
|
||||
(format #t "~a finished the game.\n" user-name)))))
|
||||
|
||||
;;
|
||||
;; Standard rock paper scissors logic follows!
|
||||
|
|
Loading…
Reference in New Issue