From 2c8b5e711035f340e94fd3bd2bd8a7d8b51cbae7 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 14 Feb 2025 17:35:01 +0000 Subject: Deck and joker constructor Joker constructor takes a rank for uniqueness - rank doesn't really change anything in terms of the "power" of a joker but helps with ensuring jokers are unique in a deck. Deck constructor takes an optional argument for the number of decks. A deck includes two jokers, so n decks include 2n jokers. --- packages.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages.lisp') diff --git a/packages.lisp b/packages.lisp index 3ea9ba7..28fd51b 100644 --- a/packages.lisp +++ b/packages.lisp @@ -43,7 +43,9 @@ ;; Comparators :suit< :rank< :card< ;; Serialisers - :suit->str :rank->str :card->str :cardset->str)) + :suit->str :rank->str :card->str :cardset->str + ;; Constructors + :make-joker :make-deck)) (defpackage cantedraw.main (:use :cl :cantedraw.lib.macros :cantedraw.lib.functions) -- cgit v1.2.3-13-gbd6f