lispjam24/structs.rkt

20 lines
473 B
Racket

#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 obj (name pos))
(struct item obj (size))
(struct equipment item (type))
(struct weapon equipment (damage))
(struct armor equipment (resistance))
(struct entity obj (inventory))
(struct creature entity (species health equipment))
(struct player creature (capacity))
(struct room (pos size contents))