Adjust rank->int and int->rank for ACE supremacy
Generally, ACE is the best card in Cantedraw in a card-by-card basis thus it should be the higher when comparing.
This commit is contained in:
20
model.lisp
20
model.lisp
@@ -53,19 +53,19 @@
|
||||
|
||||
(fn int->rank (n) (-> (int-card) rank)
|
||||
(case (mod n 13)
|
||||
(0 :Ace)
|
||||
(10 :Jack)
|
||||
(11 :Queen)
|
||||
(12 :King)
|
||||
(t (+ n 1))))
|
||||
(9 :Jack)
|
||||
(10 :Queen)
|
||||
(11 :King)
|
||||
(12 :Ace)
|
||||
(t (+ n 2))))
|
||||
|
||||
(fn rank->int (rank) (-> (rank) (integer 0 12))
|
||||
(case rank
|
||||
(:Ace 0)
|
||||
(:Jack 10)
|
||||
(:Queen 11)
|
||||
(:King 12)
|
||||
(t (- rank 1))))
|
||||
(:Jack 9)
|
||||
(:Queen 10)
|
||||
(:King 11)
|
||||
(:Ace 12)
|
||||
(t (- rank 2))))
|
||||
|
||||
(fn int->card (num) (-> (int-card) card)
|
||||
(cons (int->rank num)
|
||||
|
||||
Reference in New Issue
Block a user