(define "Columns" 8) //------------------------------------------------------------------------------ (game "Lobudok" (players 2) (equipment { (mancalaBoard 4 "Columns" store:None { (track "Track1" "0,E,N1,W" loop:True P1) (track "Track2" "16,E,N1,W" loop:True P2) } ) (regions "Home" P1 (sites Track "Track1")) // P1 home (regions "Home" P2 (sites Track "Track2")) // P2 home (regions "Inner" P1 (difference (sites Track "Track1") (sites Bottom))) // P1 inner home (regions "Inner" P2 (difference (sites Track "Track2") (sites Top))) // P2 inner home (regions "SideHoles" P1 (intersection (sites Track "Track1") (union (sites Left) (sites Right)))) // P1 sides holes (regions "SideHoles" P2 (intersection (sites Track "Track2") (union (sites Right) (sites Left)))) // P2 sides holes (piece "Seed" Shared) (hand Each) }) (rules (start { (set Count 1 to:(sites {2 5 13 10 29 26 18 21})) (set Count 8 to:(sites {15 16 8 23})) (set Count 6 to:(sites {6 9 22 25})) }) (play (or (move Select (from (if ("SameTurn") "LastHoleSowed" (difference (sites Mover "Home") (sites Mover "SideHoles")) ) if:(> (count at:(from)) 1) ) (then (sow "Track" owner:(mover) apply:(if (and { (is In (to) (sites Mover "Inner")) (< 1 (count at:(to))) (is Occupied ("OppositeOuterPit" (to))) (is Occupied ("OppositePit" (to))) }) (and { (fromTo (from ("OppositeOuterPit" (to))) (to (last From)) count:(count at:("OppositeOuterPit" (to))) ) (fromTo (from ("OppositePit" (to))) (to (last From)) count:(count at:("OppositePit" (to))) ) (sow (last From) count:(+ (count at:("OppositePit" (to))) (count at:("OppositeOuterPit" (to)))) "Track" owner:(mover) skipIf:(and (!= 1 (value Player Mover)) (is In (to) (sites "SideHoles"))) ) }) (if (< 1 (count at:(to))) (moveAgain) ) ) skipIf:(and (!= 1 (value Player Mover)) (is In (to) (sites "SideHoles"))) ) ) ) (if (if (= 1 (value Player Mover)) True (all Sites (difference (sites Mover "Home") (sites Mover "SideHoles")) if:(<= (count at:(site)) 1)) ) (move Select (from (if ("SameTurn") "LastHoleSowed" (sites Mover "SideHoles") ) if:(> (count at:(from)) 1) ) (then (and (sow "Track" owner:(mover) apply:(if (and { (is In (to) (sites Mover "Inner")) (< 1 (count at:(to))) (is Occupied ("OppositeOuterPit" (to))) (is Occupied ("OppositePit" (to))) }) (and { (fromTo (from ("OppositeOuterPit" (to))) (to (last From)) count:(count at:("OppositeOuterPit" (to))) ) (fromTo (from ("OppositePit" (to))) (to (last From)) count:(count at:("OppositePit" (to))) ) (sow (last From) count:(+ (count at:("OppositePit" (to))) (count at:("OppositeOuterPit" (to)))) "Track" owner:(mover) ) }) (if (< 1 (count at:(to))) (moveAgain) ) ) ) (if (= 0 (value Player Mover)) (set Value Mover 1) ) ) ) ) ) ) ) (end ("ForEachPlayerNoMovesLoss")) ) ) //------------------------------------------------------------------------------ (metadata (info { (description "Lobuduok is a four-row mancala-style board game played by the Bari people in South Sudan. The holes are scooped out of the ground and the counters are usually seeds or pebbles, which represent cows. It is an unusual mancala-style game because certain holes are out of play during portions of the game.") (aliases {"Lobudök" "Soro"}) (rules "4x8 board. The counters begin in the following arrangement, starting from a player's left most hole in the outer row and proceeding anticlockwise: 0,0,1,0,0,1,6,0,8,0,1,0,0,1,6,8. To start, players may not sow into or sow from the leftmost and rightmost holes in both of their rows. When it is no longer possible for the player to make a legal move using only these twelve holes, they may then play using all of the holes. The opponent must continue using only twelve holes until they also cannot make a legal move with them. Sowing proceeds in an anti-clockwise direction. When the final counter falls into an occupied hole in the player's inner row and both of the opposite holes on the opponent's side of the board are occupied, the counters in the opposite holes are captured and sown beginning in the first hole that was sown into to begin the sowing that caused the capture. When the final counter falls into an occupied hole and a capture is not possible, the contents of the hole are picked up and sowing continues. When the final counter lands in an empty hole, the turn ends. Players cannot sow from a hole containing a single counter. The player who captures all of their opponent's counters wins. ") (source "Beaton 1939: 141-142.") (id "1284") (version "1.3.12") (classification "board/sow/four rows") (credit "Eric Piette") (origin "This game was played in South Sudan, around 1939.") } ) (graphics { (board Style Mancala) }) (ai "Lobudok_ai" ) )