(define "PiecesOwnedBy" (count Cell at:(handSite #1))) //------------------------------------------------------------------------------ (game "Hoyito" (players 2) (equipment { (mancalaBoard 2 store:None (track "Track" "0,E,N,W" loop:True) ) (regions P1 (sites Bottom)) // P1 home (regions P2 (sites Top)) // P2 home (piece "Seed" Shared) (hand Each) }) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if ("SameTurn") "LastHoleSowed" (sites Mover) ) if:(> (count at:(from)) 0) ) (then (sow apply:(if (= (count at:(to)) 4) (if (<= (count in:(sites Board)) 8) (forEach Site (sites Board) (if (> (count at:(site)) 0) (fromTo (from (site)) (to (handSite Mover)) count:(count at:(site)) ) ) ) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)) ) ) (if (< (count at:(to)) 1) (moveAgain) ) ) ) ) ) ) (end ("MancalaByScoreWhen" (no Moves Mover))) ) ) //------------------------------------------------------------------------------ (option "Board Size" args:{ } { (item "6" <6> "Each player has 6 holes.")* (item "7" <7> "Each player has 7 holes.") (item "8" <8> "Each player has 8 holes.") (item "9" <9> "Each player has 9 holes.") (item "10" <10> "Each player has 10 holes.") (item "11" <11> "Each player has 11 holes.") (item "12" <12> "Each player has 12 holes.") }) //------------------------------------------------------------------------------ (rulesets { (ruleset "Ruleset/Hoyito I (Described)" { "Board Size/6" } variations:{"Board Size/7" "Board Size/8" "Board Size/9" "Board Size/10" "Board Size/11" "Board Size/12" } )* }) //------------------------------------------------------------------------------ (metadata (info { (description "Hoyito is a two-row mancala-style board game that is played in the Dominican Republic. It is similar to other games from the Caribbean, which were likely brought to the region by enslaved African people during European colonisation.") (aliases {"El Hoyito" "Casitas" "Mate"}) (rules "2x6-12 board, six is the most common. Four counters in each hole. A player moves by picking up the contents of one of their holes and sowing them in an anti-clockwise direction. If the final counter lands in an occupied hole, the contents of this hole are picked up and sowing continues. If the final counter falls into an empty hole, the turn ends. If the final counter falls into a hole containing three counters, making it four after the sowing, then these counters are captured and the turn ends. If at any time during sowing a player drops a counter into a hole to make it contain four, these are captured. If a player cannot move because there are no counters in their holes, they pass. When eight counters are left, the player to first capture a group of four also takes the remaining four counters on the board.") (source "Gering and Bautista i Roca 2005.") (id "290") (version "1.3.12") (classification "board/sow/two rows") (credit "Eric Piette") } ) (graphics { (board Style Mancala) } ) (ai "Hoyito_ai" ) )