(define "Columns" 6) (define "PiecesOwnedBy" (+ (count Cell at:(handSite #1)) (count in:(sites #1)))) //------------------------------------------------------------------------------ (game "Baqura" (players 2) (equipment { (mancalaBoard 2 6 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 36 at:(handSite P1)) (set Count 36 at:(handSite P2)) }) phases:{ (phase "Placement" (play (move (from (handSite Mover)) (to (sites Mover)) ) ) (nextPhase Mover ("HandEmpty" Mover) "Sowing") ) (phase "Sowing" (play (if (not (all Sites (sites Mover) if:(= 0 (count at:(site))))) (move Select (from (if "SameTurn" "LastHoleSowed" (sites Mover) ) if:(> (count at:(from)) 0) ) (then (sow if:(> (count at:(to)) 1) apply:(if (and (> (count at:(to)) 1) (is Odd (count at:(to)))) (moveAgain) (and (if (> (count at:("OppositePitTwoRows" (to))) 0) (fromTo (from ("OppositePitTwoRows" (to))) (to (handSite Mover)) count:(count at:("OppositePitTwoRows" (to))) ) ) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)) ) ) ) backtracking:(and {(is In (to) (sites Mover)) (> (count at:(to)) 1) (is Even (count at:(to))) }) ) ) ) (move Pass (then (and (forEach Site (sites Next) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite Next)) count:(count at:(site)) ) ) ) (if (< ("PiecesOwnedBy" P1) ("PiecesOwnedBy" P2)) (set NextPlayer (player 1)) (set NextPlayer (player 2)) ) ) ) ) ) ) (nextPhase (was Pass) "PlacementLosingPlayer") ) (phase "PlacementLosingPlayer" (play (move (from (handSite Mover)) (to (sites Mover)) (then (if ("HandEmpty" Mover) (forEach Site (sites Mover) (if (is Occupied (site)) (fromTo (from Cell (handSite Next)) (to ("OppositePitTwoRows" (site))) count:(count at:(site)) ) ) ) (moveAgain) ) ) ) ) (nextPhase ("HandEmpty" Mover) "Sowing") ) } (end (forEach Player if:(= 0 ("PiecesOwnedBy" Player)) (result Player Loss) ) ) ) ) //------------------------------------------------------------------------------ (metadata (info { (description "Baqura is a two-row mancala-style board game reported in the seventeenth century by Thomas Hyde in his De Ludis Orientalibus. He describes the rules and states that it was played in Mesopotamia.") (rules "2x6 board. Each player has 36 counters which they arrange however they like in their holes. Play begins from any hole in a player's row. Sowing occurs in an anti-clockwise direction. When the last counter falls makes an odd number of counters in the final hole of the sowing, these are picked up and sowing continues. If the last hole is made to be even, these are captured, as well as the contents of the opposite hole. If the previous hole is also even, those counters and those in the opposite hole are also taken, continuing until there is an odd or empty hole. If the final counter falls into an empty hole, play ends. The round ends when one player is unable to move. A new round begins. The player with the smaller number of counters distributes them as they like in their holes. The opponent then copies this arrangement, keeping the surplus of counters. Play continues as before. Rounds are played until one player has no remaining counters.") (source "Hyde 1694: 230-232.") (id "212") (version "1.3.12") (classification "board/sow/two rows") (credit "Eric Piette") (origin "This game was played in Mesopotamia, around 1694.") } ) (graphics { (board Style Mancala) }) (ai "Baqura_ai" ) )