// Game modelled without the simultaneous play. (define "Columns" 5) (define "LastHoleSowed" (sites {("NextSite" from:(last To afterConsequence:True))})) (define "NextSite" (if (= ("NextSiteOnTrack" 1 #1) (mapEntry Mover)) ("NextSiteOnTrack" 2 #1) ("NextSiteOnTrack" 1 #1) ) ) //------------------------------------------------------------------------------ (game "Sonka" (players 2) (equipment { (mancalaBoard 2 "Columns" { (track "Track1" "11,10,W,S,E" loop:True P1) (track "Track2" "0,1,E,N,W" loop:True P2) } ) (piece "Seed" Shared) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (map {(pair P1 LastSite) (pair P2 FirstSite)}) // kalahs (storage pits) }) (rules (start (set Count 6 to:(union (sites Bottom) (sites Top)))) phases:{ (phase "Sowing" (play (move Select (from (if ("SameTurn") "LastHoleSowed" (sites Mover "Home") ) if:(< 0 (count at:(from))) ) (then (sow "Track" owner:(mover) apply:(if (!= 0 (count at:("NextSite" from:(to)))) (moveAgain) (if (is In (to) (sites Mover "Home")) (if (!= 0 (count at:("OppositePit" (to)))) (fromTo (from ("OppositePit" (to))) (to (mapEntry Mover)) count:(count at:("OppositePit" (to))) ) ) ) ) ) ) ) ) (end (if (all Passed) { (if (> 6 (count at:(mapEntry P1))) (result P2 Win)) (if (> 6 (count at:(mapEntry P2))) (result P1 Win)) } ) ) (nextPhase (all Passed) "BetweenRounds") ) (phase "BetweenRounds" (play (if (<= 6 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (intersection (sites Empty) (sites Mover "Home"))) count:6 ) ) ) (nextPhase (all Passed) "Sowing") ) } ) ) //------------------------------------------------------------------------------ (metadata (info { (description "Sonka is a two-row mancala-style board game played by the Iloko people of the Philippines.") (aliases {"Chunccajon" "Agsinnonka"}) (rules "2x5 board with one store on either side. Six counters in each hole. Players play each turn simultaneously. Players sow from the holes in their row in an anti-clockwise direction, including their own store but not the opponent's store. When the final counter is sown, the contents of the next hole are picked up and sowing continues. If this hole is empty, the move ends and the player must wait for the other player to finish the move before they begin again. If the move ends in the player's own row, the player captures the counters in the opponent's row opposite to the one in which the last counter was dropped. Play continues until all of the counters are in the stores. The counters are then redistributed into the holes as at the beginning of the game. The player with extra counters places them in the store.") (source "Vanoverbergh 1927: 236-237.") (id "222") (version "1.3.12") (classification "board/sow/two rows") (credit "Eric Piette") } ) (graphics { (board Style Mancala) }) (ai "Sonka_ai" ) )