~subsetpark/card-game-rules

552c1ef72c7e390faf904509c699911192330b30 — Zach Smith 1 year, 6 months ago ac6c39c
some
1 files changed, 9 insertions(+), 7 deletions(-)

M site/games/cirulla.html
M site/games/cirulla.html => site/games/cirulla.html +9 -7
@@ 103,9 103,9 @@ add up to 15;</li>

<br>
play p c =<br>
&emsp;(some k: Card … match p c k) ⊕ <br>
&emsp;(some ks: {Card} … add-to p c ks) ⊕ <br>
&emsp;(some ks: {Card} … make-15 p c ks) ⊕ <br>
&emsp;(∃ k: Card … match p c k) ⊕ <br>
&emsp;(∃ ks: {Card} … add-to p c ks) ⊕ <br>
&emsp;(∃ ks: {Card} … make-15 p c ks) ⊕ <br>
&emsp;ace-scopa p c ⊕ <br>
&emsp;discard p c.<br>
<br>


@@ 167,7 167,7 @@ make-15 p: Player, c: Card, ks: {Card},<br>
ace-scopa p: Player, c: Card,<br>
&emsp;value c = 1,<br>
&emsp;#table > 0,<br>
&emsp;¬(some k: Card, k in table … value k = 1).<br>
&emsp;¬(∃ k: Card, k in table … value k = 1).<br>
<br>
<blockquote>
<p>Discarding a card:</p>


@@ 243,6 243,7 @@ bonuses:</p>

<br>
claim-table-bonus p: Player, cards-on-table: {Card}, <br>
&emsp;∀ p′: Player … #(hand p′) = 3,<br>
&emsp;p = dealer,<br>
&emsp;∀ c: Card, c in cards-on-table … c in table.<br>
<br>


@@ 254,6 255,7 @@ claim-table-bonus p: Player, cards-on-table: {Card}, <br>

<br>
claim-hand-bonus p: Player, cards-dealt: {Card}, <br>
&emsp;#(hand p) = 3,<br>
&emsp;∀ c: Card, c in cards-dealt … c in hand p.<br>
<hr class=chapter-separator>
<br>


@@ 273,7 275,7 @@ card-sum cards-on-table = 30 → score p 2.<br>

<br>
card-sum cards-dealt < 10 → score p 3.<br>
some v: ℕ … <br>
∃ v: ℕ … <br>
&emsp;∀ c: Card, c in cards-dealt … value c = v → score p 10.<br>
<br>
<p class=where>where</p>


@@ 330,7 332,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 ↔  some 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>


@@ 385,7 387,7 @@ round.</p>
</blockquote>

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