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)
|
(fn int->rank (n) (-> (int-card) rank)
|
||||||
(case (mod n 13)
|
(case (mod n 13)
|
||||||
(0 :Ace)
|
(9 :Jack)
|
||||||
(10 :Jack)
|
(10 :Queen)
|
||||||
(11 :Queen)
|
(11 :King)
|
||||||
(12 :King)
|
(12 :Ace)
|
||||||
(t (+ n 1))))
|
(t (+ n 2))))
|
||||||
|
|
||||||
(fn rank->int (rank) (-> (rank) (integer 0 12))
|
(fn rank->int (rank) (-> (rank) (integer 0 12))
|
||||||
(case rank
|
(case rank
|
||||||
(:Ace 0)
|
(:Jack 9)
|
||||||
(:Jack 10)
|
(:Queen 10)
|
||||||
(:Queen 11)
|
(:King 11)
|
||||||
(:King 12)
|
(:Ace 12)
|
||||||
(t (- rank 1))))
|
(t (- rank 2))))
|
||||||
|
|
||||||
(fn int->card (num) (-> (int-card) card)
|
(fn int->card (num) (-> (int-card) card)
|
||||||
(cons (int->rank num)
|
(cons (int->rank num)
|
||||||
|
|||||||
Reference in New Issue
Block a user