~subsetpark/card-game-rules

64bb00af0cce817d3099f9ba196d7181ff31df53 — Zach Smith 1 year, 6 months ago 552c1ef
use do's
2 files changed, 18 insertions(+), 8 deletions(-)

M cirulla.pant
M site/games/cirulla.html
M cirulla.pant => cirulla.pant +9 -4
@@ 113,13 113,18 @@ value c = case (rank c) ...
	"king" => 10,
	_ => rank c.

match p c k -> capture p c and capture p k.
match p c k -> do
	capture p c;
	capture p k.

add_to p c ks or
make_15 p c ks
	-> capture p c and all k: Card, k in ks ... capture p k.
make_15 p c ks -> do
	capture p c;
	all k: Card, k in ks ... capture p k.

ace_scopa p c -> capture p c and all k: Card, k in table ... capture p k.
ace_scopa p c -> do
	capture p c;
	all k: Card, k in table ... capture p k.

// Players add to the table by discarding, and take from the table by
// capturing.

M site/games/cirulla.html => site/games/cirulla.html +9 -4
@@ 196,13 196,18 @@ value c = case (rank c) …<br>
&emsp;"king" ⇒ 10,<br>
&emsp;_ ⇒ rank c.<br>
<br>
match p c k → capture p c and capture p k.<br>
match p c k → do<br>
&emsp;capture p c;<br>
&emsp;capture p k.<br>
<br>
add-to p c ks or<br>
make-15 p c ks<br>
&emsp;→ capture p c and ∀ k: Card, k in ks … capture p k.<br>
make-15 p c ks → do<br>
&emsp;capture p c;<br>
&emsp;∀ k: Card, k in ks … capture p k.<br>
<br>
ace-scopa p c → capture p c and ∀ k: Card, k in table … capture p k.<br>
ace-scopa p c → do<br>
&emsp;capture p c;<br>
&emsp;∀ k: Card, k in table … capture p k.<br>
<br>
<blockquote>
<p>Players add to the table by discarding, and take from the table by