lispjam24/structs.rkt

22 lines
558 B
Racket
Raw Normal View History

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