Section headers

This commit is contained in:
Vivianne 2023-02-05 04:51:13 -08:00
parent 14ea86a928
commit 659397f9c9

View file

@ -8,6 +8,9 @@
#:use-module (oop goops)
#:export (do-rps join-rps pick-rps rps-winner rock-paper-scissors))
;;
;; Host logic
;;
(define-class <rps-host> ()
(vat #:accessor vat #:init-thunk spawn-vat)
(lobby #:accessor lobby)
@ -30,6 +33,9 @@
(define (do-rps user-name)
(make <rps-host> #:user-name user-name))
;;
;; Client logic
;;
(define-class <rps-client> ()
(vat #:accessor vat #:init-keyword #:vat #:init-thunk spawn-vat)
(lobby #:accessor lobby)
@ -53,8 +59,9 @@
(lambda (_)
(format #t "Ok! we are registered.\n")))))
;;
;; Standard rock paper scissors logic follows!
;;
(define rock-paper-scissors (list 'rock 'paper 'scissors))
(define (pick-rps)