Compare commits
2 Commits
e26d465c0e
...
37d0a75ea7
Author | SHA1 | Date |
---|---|---|
Nico | 37d0a75ea7 | |
Nico | a846b01be5 |
5
gui.rkt
5
gui.rkt
|
@ -42,7 +42,7 @@
|
|||
|
||||
(define buttonpanel (new horizontal-panel%
|
||||
[parent frame]
|
||||
[alignment '(center center)]
|
||||
; [alignment '(center center)]
|
||||
[stretchable-height #f]
|
||||
))
|
||||
(define backbutton (new button%
|
||||
|
@ -61,6 +61,9 @@
|
|||
(set! t (add1 t)) 0)
|
||||
(send log select (- t 1))
|
||||
(send grid refresh))]))
|
||||
(define score (new message%
|
||||
[parent buttonpanel]
|
||||
[label (format "Final Score: R: ~a, B: ~a" (first (GameState-scores game)) (last (GameState-scores game)))]))
|
||||
(send frame show #t))
|
||||
|
||||
(define g (play-game (GameState '() 0 '(0 0)) (list random-player random-player)))
|
||||
|
|
2
main.rkt
2
main.rkt
|
@ -16,7 +16,7 @@
|
|||
; grid is the grid
|
||||
; player is the current player
|
||||
; scores is a list of numbers for the score of each player.
|
||||
(struct GameState (grid player scores))
|
||||
(struct GameState (grid player scores) #:transparent)
|
||||
|
||||
; width and height of the playing grid.
|
||||
(define GRID-WIDTH 6)
|
||||
|
|
Loading…
Reference in New Issue