2024-05-21 17:19:59 +00:00
|
|
|
#lang racket/gui
|
|
|
|
(provide (all-defined-out))
|
|
|
|
|
2024-05-21 18:43:13 +00:00
|
|
|
(struct pos (x y))
|
|
|
|
;for clarity - an x/y pair that represents a dimension instead of a position
|
|
|
|
(struct dim pos ())
|
|
|
|
|
|
|
|
(struct obj (name pos))
|
|
|
|
|
|
|
|
(struct item obj (size))
|
2024-05-21 17:19:59 +00:00
|
|
|
(struct equipment item (type))
|
|
|
|
(struct weapon equipment (damage))
|
|
|
|
(struct armor equipment (resistance))
|
|
|
|
|
2024-05-23 19:22:05 +00:00
|
|
|
(struct entity obj ((inventory #:mutable)))
|
|
|
|
(struct creature entity (species
|
|
|
|
(health #:mutable)
|
|
|
|
(equipment #:mutable)))
|
2024-05-21 18:43:13 +00:00
|
|
|
(struct player creature (capacity))
|
2024-05-21 17:19:59 +00:00
|
|
|
|
2024-05-23 19:22:05 +00:00
|
|
|
(struct room (pos
|
|
|
|
size
|
|
|
|
(contents #:mutable)))
|