This repository has been archived on 2025-11-10 . You can view files and clone it. You cannot open issues or pull requests or push a commit.
76a70172464f054a3ff3d0d51642a143d76ec31a
Given n in 0..51, certainly there exists r, s s.t. `n = 13s + r` where r in 0..12 and s in 0..3. `r` is the rank, and `s` is the suit. ranks are ordered Ace, 2, 3, ..., Queen, King and suits are ordered Diamond, Club, Heart, Spade. Therefore there is a 1-1 correspondence between 0..51 and any card in the deck. Jokers are a bit less straightforward; for now I'll define them as an outlier which doesn't exist in the same bounds (which is why they're the default return for suit in int->suit). Likely I'll go for -1 representing a Joker.
-------------------------------------------------------- | _____ _ _ | | / ____| | | | | | | | | __ _ _ __ | |_ ___ __| |_ __ __ ___ __ | | | | / _` | '_ \| __/ _ \/ _` | '__/ _` \ \ /\ / / | | | |___| (_| | | | | || __/ (_| | | | (_| |\ V V / | | \_____\__,_|_| |_|\__\___|\__,_|_| \__,_| \_/\_/ | -------------------------------------------------------- Cantedraw: the five card poker game. A simulator written in Common Lisp. Goals: - Players can use a terminal emulator or a web browser - Players can join games hosted on other machines - Games may have up to 12 players - Games may include bots - Bots have different ranks of difficulty
Languages
Common Lisp
99.6%
Shell
0.4%