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 ())
|
|
|
|
|
2024-05-26 00:42:15 +00:00
|
|
|
(struct object (name))
|
2024-05-21 18:43:13 +00:00
|
|
|
|
2024-05-24 00:19:00 +00:00
|
|
|
(struct item object (size))
|
2024-05-21 17:19:59 +00:00
|
|
|
(struct equipment item (type))
|
|
|
|
(struct weapon equipment (damage))
|
|
|
|
(struct armor equipment (resistance))
|
|
|
|
|
2024-05-24 00:19:00 +00:00
|
|
|
(struct entity object ((inventory #:mutable)))
|
2024-05-23 19:22:05 +00:00
|
|
|
(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-24 00:19:00 +00:00
|
|
|
(struct room entity (size))
|