Player handler package

This package defines a player data structure, collections of players,
and different interactions you can have with them:
- Extracting attributes (destructors)
- Checking if they're bankrupt or can bet
- Modifying a collection to adjust the balance of any one
  player (including errors in case that isn't possible)
This commit is contained in:
2025-02-15 15:37:16 +00:00
parent 2323b5e0ed
commit 4ded442dd4
3 changed files with 85 additions and 0 deletions

View File

@@ -48,6 +48,18 @@
;; Constructors
:make-joker :make-deck))
(defpackage cantedraw.player
(:use :cl
:cantedraw.lib.macros :cantedraw.lib.functions
:cantedraw.model)
(:export
:player
:players
:player-id :player-balance :player-hand
:player-exists? :player-bankrupt? :player-can-bet?
:player-pay
:player-receive))
(defpackage cantedraw.game
(:use :cl
:cantedraw.lib.macros :cantedraw.lib.functions