Further tidying
This commit is contained in:
parent
659397f9c9
commit
71e35eb2d5
2 changed files with 3 additions and 5 deletions
|
@ -6,7 +6,7 @@
|
||||||
#:use-module (oop goops)
|
#:use-module (oop goops)
|
||||||
#:export (^game-lobby ^client-picker))
|
#:export (^game-lobby ^client-picker))
|
||||||
|
|
||||||
(define* (^game-lobby bcom)
|
(define (^game-lobby bcom)
|
||||||
(define pick (pick-rps))
|
(define pick (pick-rps))
|
||||||
(methods
|
(methods
|
||||||
((register-opponent name client sealed-pick)
|
((register-opponent name client sealed-pick)
|
||||||
|
|
|
@ -20,8 +20,7 @@
|
||||||
(next-method)
|
(next-method)
|
||||||
(with-vat (vat host)
|
(with-vat (vat host)
|
||||||
(set! (lobby host) (spawn ^game-lobby))
|
(set! (lobby host) (spawn ^game-lobby))
|
||||||
(define uds-netlayer (new-testuds-netlayer))
|
(define mycapn (spawn-mycapn (new-testuds-netlayer)))
|
||||||
(define mycapn (spawn-mycapn uds-netlayer))
|
|
||||||
(define lobby-sref ($ mycapn 'register (lobby host) 'testuds))
|
(define lobby-sref ($ mycapn 'register (lobby host) 'testuds))
|
||||||
(format #t "Connect to: ~a\n" (ocapn-id->string lobby-sref))))
|
(format #t "Connect to: ~a\n" (ocapn-id->string lobby-sref))))
|
||||||
|
|
||||||
|
@ -46,8 +45,7 @@
|
||||||
(next-method)
|
(next-method)
|
||||||
(with-vat (vat client)
|
(with-vat (vat client)
|
||||||
(define lobby-sref (string->ocapn-id (addr client)))
|
(define lobby-sref (string->ocapn-id (addr client)))
|
||||||
(define uds-netlayer (new-testuds-netlayer))
|
(define mycapn (spawn-mycapn (new-testuds-netlayer)))
|
||||||
(define mycapn (spawn-mycapn uds-netlayer))
|
|
||||||
(set! (lobby client)
|
(set! (lobby client)
|
||||||
(<- mycapn 'enliven lobby-sref))))
|
(<- mycapn 'enliven lobby-sref))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue