From 4ded442dd47babd9f3c0163ffe274f92d0e153a7 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 15 Feb 2025 15:37:16 +0000 Subject: 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) --- packages.lisp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'packages.lisp') diff --git a/packages.lisp b/packages.lisp index 1898e35..574da08 100644 --- a/packages.lisp +++ b/packages.lisp @@ -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 -- cgit v1.2.3-13-gbd6f