~subsetpark/card-game-rules

93a873558861bddccde8ebad5fb7262965c673f8 — Zach Smith 1 year, 4 months ago 64bb00a master
italics
2 files changed, 13 insertions(+), 13 deletions(-)

M cirulla.pant
M site/games/cirulla.html
M cirulla.pant => cirulla.pant +1 -1
@@ 223,7 223,7 @@ primiera_score p: Player => Nat.
has_all_the_way_down? p: Player, s: Suit, r: Rank => Bool.
---

captured? p s r <->  some c: Card ... 
captured? p s r <-> some c: Card ...
	c in captures p and 
	suit c = s and
	value c = r.

M site/games/cirulla.html => site/games/cirulla.html +12 -12
@@ 191,9 191,9 @@ then 8, 9, 10 for the courts.</p>

<br>
value c = case (rank c) …<br>
&emsp;"jack" ⇒ 8,<br>
&emsp;"queen" ⇒ 9,<br>
&emsp;"king" ⇒ 10,<br>
&emsp;<i>jack</i> ⇒ 8,<br>
&emsp;<i>queen</i> ⇒ 9,<br>
&emsp;<i>king</i> ⇒ 10,<br>
&emsp;_ ⇒ rank c.<br>
<br>
match p c k → do<br>


@@ 304,23 304,23 @@ has-majority-cards? p ↔ #(captures p) > 20.<br>
has-majority-cards? p → score p 1.<br>
<br>
has-majority-diamonds? p ↔ <br>
&emsp;#{∀ c: Card, c in captures p, suit c = "diamonds" … c} > 5.<br>
&emsp;#{∀ c: Card, c in captures p, suit c = <i>diamonds</i> … c} > 5.<br>
has-majority-diamonds? p → score p 1.<br>
<br>
has-sette-bello? ↔ captured? p "diamonds" 7.<br>
has-sette-bello? ↔ captured? p <i>diamonds</i> 7.<br>
has-sette-bello? p → score p 1.<br>
<br>
has-primiera? p ↔ ∀ other-p: Player, other-p ≠ p … <br>
&emsp;primiera-score p > primiera-score other-p.<br>
has-primiera? p → score p 1.<br>
<br>
has-piccolo? p ↔ has-all-the-way-down? p "diamonds" 3.<br>
has-piccolo? p → score p #{∀ r: Rank … has-all-the-way-down? p "diamonds" r}.<br>
has-piccolo? p ↔ has-all-the-way-down? p <i>diamonds</i> 3.<br>
has-piccolo? p → score p #{∀ r: Rank … has-all-the-way-down? p <i>diamonds</i> r}.<br>
<br>
has-grande? p ↔ <br>
&emsp;captured? p "diamonds" "jack" and<br>
&emsp;captured? p "diamonds" "queen" and<br>
&emsp;captured? p "diamonds" "king".<br>
&emsp;captured? p <i>diamonds</i> <i>jack</i> and<br>
&emsp;captured? p <i>diamonds</i> <i>queen</i> and<br>
&emsp;captured? p <i>diamonds</i> <i>king</i>.<br>
<br>
<p class=where>where</p>
<br>


@@ 337,7 337,7 @@ primiera-score p: Player ⇒ ℕ.<br>
has-all-the-way-down? p: Player, s: Suit, r: Rank ⇒ 𝔹.<br>
<hr class=chapter-separator>
<br>
captured? p s r ↔  ∃ c: Card … <br>
captured? p s r ↔ ∃ c: Card …<br>
&emsp;c in captures p and <br>
&emsp;suit c = s and<br>
&emsp;value c = r.<br>


@@ 394,7 394,7 @@ round.</p>
<br>
(∃ p: Player …<br>
&emsp;scores p ≥ 51 or<br>
&emsp;#{∀ c: Card, c in captures p, suit c = "diamonds" … c} = 10)<br>
&emsp;#{∀ c: Card, c in captures p, suit c = <i>diamonds</i> … c} = 10)<br>
&emsp;→ win? p.<br>
<br>
</body>