description
stringlengths 4
3.37k
| implementation
stringlengths 175
9.58k
| text
stringlengths 365
12.1k
|
---|---|---|
3x6 board. Three counters per hole. Each player owns the row of holes closest to them, as well as the right half of the central row, with respect to their perspective. Sowing occurs from left to right in the player's complete row, right to left in the player's half of the central row, then continuing from right to left in the opponent's outer row, left to right in the opponent's holes in the central row, and then continuing as before into the player's outer row. In the opening phase, players play simultaneously. When the final counter of a sowing falls into an occupied hole, the contents are picked up and sowing continues. Each player plays until their final counter falls into an empty hole; the first player to do so begins the main phase. In the main phase, players alternate turns, and picking up the counters and continuing to sow when the final counter lands in an occupied hole, and stopping when the final counter lands in an empty hole. There are some restrictions with regard to sowing. Each of the player's three leftmost holes cannot be sown from to begin a turn if they contain three counters or less, unless there are no other options for play, in which case sowing must occur from a hole with one counter, and if none are available, then it must begin from a hole with two counters, or three counters if that is the only option. Separately, if the player's other holes only contain two or three counters, the player must play from a hole containing two counters, and these must be the option closest to the opponent's holes. Players must also play from holes containing more than three counters when available. During sowing, a player may not drop a counter into any of the opponent's holes which contain three counters (except when making a nedf, see below), skipping over them and sowing in the next available holes. When the final counter of a sowing lands in a hole in the opponent's row containing three counters, this hole becomes a "nedf." Any counters falling into the nedf cannot be sown. Only one nedf can exist at one time. After the first nedf is made, any others can only be made by placing the final two counters of a sowing into holes which contain three counters, the penultimate hole becoming the new nedf. The player then continues their turn with the counters from the final hole. The hole after the nedf becomes the yazab tabaqi, or "guardian." While the yazab tabaqi contains exactly three counters, the opponent cannot create a new nedf. Play continues until one player has no counters to move, or concedes they can no longer make a nedf. | (game "Selus" (players 2) (equipment {(mancalaBoard 3 6 store:None (track "Track" "0,E,N1,W2,17,W,S1,E2" loop:True)) (piece "Seed" Shared) (hand Each) (regions "Home" P1 (union (intersection (sites Row 1) (expand (sites Right) steps:2)) (sites Bottom))) (regions "Home" P2 (union (intersection (sites Row 1) (expand (sites Left) steps:2)) (sites Top))) (regions "ThreeLeftMost" P1 (intersection (sites Bottom) (expand (sites Left) steps:2))) (regions "ThreeLeftMost" P2 (intersection (sites Top) (expand (sites Right) steps:2)))}) (rules (start (set Count 3 to:(sites Board))) (play (priority {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(< 3 (count at:(site)))) (then (do (set Var "NumSowed" (count at:(last From))) next:(sow apply:(if (< 1 (count at:(to))) (if (and {(= 0 (state at:(to))) (= 4 (count at:(to))) (all Sites (sites Board) if:(!= (mover) (state at:(site)))) (is In (to) (sites Next))}) (set State at:(to) (mover)) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(and (= 3 (count at:(to))) (is In (to) (sites Next))))))) (if (all Sites (intersection (sites Mover "Home") (sites Mover "ThreeLeftMost")) if:(or (= 2 (count at:(site))) (= 3 (count at:(site))))) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(= 2 (count at:(site)))) (then (do (set Var "NumSowed" (count at:(last From))) next:(sow apply:(if (< 1 (count at:(to))) (if (and {(= 0 (state at:(to))) (= 4 (count at:(to))) (all Sites (sites Board) if:(!= (mover) (state at:(site)))) (is In (to) (sites Next))}) (set State at:(to) (mover)) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(and (= 3 (count at:(to))) (is In (to) (sites Next)))))))) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(and (is Occupied (from)) (if (is Prev Mover) True (if (is In (to) (sites Mover "ThreeLeftMost")) (< 3 (count at:(to))) True)))) (then (do (set Var "NumSowed" (count at:(last From))) next:(sow apply:(if (< 1 (count at:(to))) (if (and {(= 0 (state at:(to))) (= 4 (count at:(to))) (all Sites (sites Board) if:(!= (mover) (state at:(site)))) (is In (to) (sites Next))}) (set State at:(to) (mover)) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(and (= 3 (count at:(to))) (is In (to) (sites Next))))))) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover "ThreeLeftMost")) if:(and (= 1 (count at:(from))) (is Occupied (from)))) (then (do (set Var "NumSowed" (count at:(last From))) next:(sow apply:(if (< 1 (count at:(to))) (if (and {(= 0 (state at:(to))) (= 4 (count at:(to))) (all Sites (sites Board) if:(!= (mover) (state at:(site)))) (is In (to) (sites Next))}) (set State at:(to) (mover)) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(and (= 3 (count at:(to))) (is In (to) (sites Next))))))) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover "ThreeLeftMost")) if:(and (= 2 (count at:(from))) (is Occupied (from)))) (then (do (set Var "NumSowed" (count at:(last From))) next:(sow apply:(if (< 1 (count at:(to))) (if (and {(= 0 (state at:(to))) (= 4 (count at:(to))) (all Sites (sites Board) if:(!= (mover) (state at:(site)))) (is In (to) (sites Next))}) (set State at:(to) (mover)) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(and (= 3 (count at:(to))) (is In (to) (sites Next))))))) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover "ThreeLeftMost")) if:(and (= 3 (count at:(from))) (is Occupied (from)))) (then (do (set Var "NumSowed" (count at:(last From))) next:(sow apply:(if (< 1 (count at:(to))) (if (and {(= 0 (state at:(to))) (= 4 (count at:(to))) (all Sites (sites Board) if:(!= (mover) (state at:(site)))) (is In (to) (sites Next))}) (set State at:(to) (mover)) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(and (= 3 (count at:(to))) (is In (to) (sites Next)))))))})) (end (if (no Moves Next) (result Mover Win))))) | ###Description
3x6 board. Three counters per hole. Each player owns the row of holes closest to them, as well as the right half of the central row, with respect to their perspective. Sowing occurs from left to right in the player's complete row, right to left in the player's half of the central row, then continuing from right to left in the opponent's outer row, left to right in the opponent's holes in the central row, and then continuing as before into the player's outer row. In the opening phase, players play simultaneously. When the final counter of a sowing falls into an occupied hole, the contents are picked up and sowing continues. Each player plays until their final counter falls into an empty hole; the first player to do so begins the main phase. In the main phase, players alternate turns, and picking up the counters and continuing to sow when the final counter lands in an occupied hole, and stopping when the final counter lands in an empty hole. There are some restrictions with regard to sowing. Each of the player's three leftmost holes cannot be sown from to begin a turn if they contain three counters or less, unless there are no other options for play, in which case sowing must occur from a hole with one counter, and if none are available, then it must begin from a hole with two counters, or three counters if that is the only option. Separately, if the player's other holes only contain two or three counters, the player must play from a hole containing two counters, and these must be the option closest to the opponent's holes. Players must also play from holes containing more than three counters when available. During sowing, a player may not drop a counter into any of the opponent's holes which contain three counters (except when making a nedf, see below), skipping over them and sowing in the next available holes. When the final counter of a sowing lands in a hole in the opponent's row containing three counters, this hole becomes a "nedf." Any counters falling into the nedf cannot be sown. Only one nedf can exist at one time. After the first nedf is made, any others can only be made by placing the final two counters of a sowing into holes which contain three counters, the penultimate hole becoming the new nedf. The player then continues their turn with the counters from the final hole. The hole after the nedf becomes the yazab tabaqi, or "guardian." While the yazab tabaqi contains exactly three counters, the opponent cannot create a new nedf. Play continues until one player has no counters to move, or concedes they can no longer make a nedf.
###Ludii
(game "Selus" (players 2) (equipment {(mancalaBoard 3 6 store:None (track "Track" "0,E,N1,W2,17,W,S1,E2" loop:True)) (piece "Seed" Shared) (hand Each) (regions "Home" P1 (union (intersection (sites Row 1) (expand (sites Right) steps:2)) (sites Bottom))) (regions "Home" P2 (union (intersection (sites Row 1) (expand (sites Left) steps:2)) (sites Top))) (regions "ThreeLeftMost" P1 (intersection (sites Bottom) (expand (sites Left) steps:2))) (regions "ThreeLeftMost" P2 (intersection (sites Top) (expand (sites Right) steps:2)))}) (rules (start (set Count 3 to:(sites Board))) (play (priority {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(< 3 (count at:(site)))) (then (do (set Var "NumSowed" (count at:(last From))) next:(sow apply:(if (< 1 (count at:(to))) (if (and {(= 0 (state at:(to))) (= 4 (count at:(to))) (all Sites (sites Board) if:(!= (mover) (state at:(site)))) (is In (to) (sites Next))}) (set State at:(to) (mover)) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(and (= 3 (count at:(to))) (is In (to) (sites Next))))))) (if (all Sites (intersection (sites Mover "Home") (sites Mover "ThreeLeftMost")) if:(or (= 2 (count at:(site))) (= 3 (count at:(site))))) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(= 2 (count at:(site)))) (then (do (set Var "NumSowed" (count at:(last From))) next:(sow apply:(if (< 1 (count at:(to))) (if (and {(= 0 (state at:(to))) (= 4 (count at:(to))) (all Sites (sites Board) if:(!= (mover) (state at:(site)))) (is In (to) (sites Next))}) (set State at:(to) (mover)) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(and (= 3 (count at:(to))) (is In (to) (sites Next)))))))) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(and (is Occupied (from)) (if (is Prev Mover) True (if (is In (to) (sites Mover "ThreeLeftMost")) (< 3 (count at:(to))) True)))) (then (do (set Var "NumSowed" (count at:(last From))) next:(sow apply:(if (< 1 (count at:(to))) (if (and {(= 0 (state at:(to))) (= 4 (count at:(to))) (all Sites (sites Board) if:(!= (mover) (state at:(site)))) (is In (to) (sites Next))}) (set State at:(to) (mover)) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(and (= 3 (count at:(to))) (is In (to) (sites Next))))))) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover "ThreeLeftMost")) if:(and (= 1 (count at:(from))) (is Occupied (from)))) (then (do (set Var "NumSowed" (count at:(last From))) next:(sow apply:(if (< 1 (count at:(to))) (if (and {(= 0 (state at:(to))) (= 4 (count at:(to))) (all Sites (sites Board) if:(!= (mover) (state at:(site)))) (is In (to) (sites Next))}) (set State at:(to) (mover)) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(and (= 3 (count at:(to))) (is In (to) (sites Next))))))) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover "ThreeLeftMost")) if:(and (= 2 (count at:(from))) (is Occupied (from)))) (then (do (set Var "NumSowed" (count at:(last From))) next:(sow apply:(if (< 1 (count at:(to))) (if (and {(= 0 (state at:(to))) (= 4 (count at:(to))) (all Sites (sites Board) if:(!= (mover) (state at:(site)))) (is In (to) (sites Next))}) (set State at:(to) (mover)) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(and (= 3 (count at:(to))) (is In (to) (sites Next))))))) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover "ThreeLeftMost")) if:(and (= 3 (count at:(from))) (is Occupied (from)))) (then (do (set Var "NumSowed" (count at:(last From))) next:(sow apply:(if (< 1 (count at:(to))) (if (and {(= 0 (state at:(to))) (= 4 (count at:(to))) (all Sites (sites Board) if:(!= (mover) (state at:(site)))) (is In (to) (sites Next))}) (set State at:(to) (mover)) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(and (= 3 (count at:(to))) (is In (to) (sites Next)))))))})) (end (if (no Moves Next) (result Mover Win))))) |
Three rows of four holes; the central two holes in the middle row are stores. Each player owns the hole in the central row to their left. Ten counters in each hole. Players sow from one of their holes, sowing first into the hole from which the counters were lifted, in an anti-clockwise direction. When the final counter lands in a hole containing two counters, these counters are captured. The player captures like this seven times. The eighth captures happens when the final counter falls into a hole containing one counter; the next capture from a hole containing three; the next from a hole containing five; then repeating the pattern of one, three, five for the rest of the game. The player who captures the most counters wins. The number of counters to have in the hole to capture in the initial captures before the sequence is 2. The number of initial captures before the sequence is 7. | (game "The Concentration Game" (players 2) (equipment {(mancalaBoard 3 4 store:None (track "Track" "0,E,N,W,S2" loop:True)) (piece "Seed" Shared) (regions P1 (union (sites {4}) (sites Bottom))) (regions P2 (union (sites {7}) (sites Top))) (map {(pair P1 5) (pair P2 6)})}) (rules (start {(set Count 10 to:(sites Outer)) (set RememberValue "NumToCaptureP1" 2) (set RememberValue "NumToCaptureP2" 2) (set RememberValue "NumCaptureTwoP1" 0) (set RememberValue "NumCaptureTwoP2" 0)}) (play (move Select (from (sites Mover) if:(< 1 (count at:(from)))) (then (sow if:(= (count at:(to)) (if (is In 2 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (+ 1 2) (if (is In 1 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) 2 (if (is In 3 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) 4 6)))) apply:(and (fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) (if (< (value Player Mover) 5) (set Value Mover (+ 1 (value Player Mover))) (if (is Mover P1) (and (forget Value "NumToCaptureP1" All) (if (is In 2 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (remember Value "NumToCaptureP1" 1) (if (is In 1 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (remember Value "NumToCaptureP1" 3) (if (is In 5 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (remember Value "NumToCaptureP1" 1) (remember Value "NumToCaptureP1" 5))))) (and (forget Value "NumToCaptureP2" All) (if (is In 2 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (remember Value "NumToCaptureP2" 1) (if (is In 1 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (remember Value "NumToCaptureP2" 3) (if (is In 5 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (remember Value "NumToCaptureP2" 1) (remember Value "NumToCaptureP2" 5)))))))) origin:True)))) (end (if (no Moves Next) (byScore {(score P1 (count at:(mapEntry P1))) (score P2 (count at:(mapEntry P2)))}))))) | ###Description
Three rows of four holes; the central two holes in the middle row are stores. Each player owns the hole in the central row to their left. Ten counters in each hole. Players sow from one of their holes, sowing first into the hole from which the counters were lifted, in an anti-clockwise direction. When the final counter lands in a hole containing two counters, these counters are captured. The player captures like this seven times. The eighth captures happens when the final counter falls into a hole containing one counter; the next capture from a hole containing three; the next from a hole containing five; then repeating the pattern of one, three, five for the rest of the game. The player who captures the most counters wins. The number of counters to have in the hole to capture in the initial captures before the sequence is 2. The number of initial captures before the sequence is 7.
###Ludii
(game "The Concentration Game" (players 2) (equipment {(mancalaBoard 3 4 store:None (track "Track" "0,E,N,W,S2" loop:True)) (piece "Seed" Shared) (regions P1 (union (sites {4}) (sites Bottom))) (regions P2 (union (sites {7}) (sites Top))) (map {(pair P1 5) (pair P2 6)})}) (rules (start {(set Count 10 to:(sites Outer)) (set RememberValue "NumToCaptureP1" 2) (set RememberValue "NumToCaptureP2" 2) (set RememberValue "NumCaptureTwoP1" 0) (set RememberValue "NumCaptureTwoP2" 0)}) (play (move Select (from (sites Mover) if:(< 1 (count at:(from)))) (then (sow if:(= (count at:(to)) (if (is In 2 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (+ 1 2) (if (is In 1 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) 2 (if (is In 3 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) 4 6)))) apply:(and (fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) (if (< (value Player Mover) 5) (set Value Mover (+ 1 (value Player Mover))) (if (is Mover P1) (and (forget Value "NumToCaptureP1" All) (if (is In 2 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (remember Value "NumToCaptureP1" 1) (if (is In 1 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (remember Value "NumToCaptureP1" 3) (if (is In 5 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (remember Value "NumToCaptureP1" 1) (remember Value "NumToCaptureP1" 5))))) (and (forget Value "NumToCaptureP2" All) (if (is In 2 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (remember Value "NumToCaptureP2" 1) (if (is In 1 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (remember Value "NumToCaptureP2" 3) (if (is In 5 (if (is Mover P1) (sites (values Remembered "NumToCaptureP1")) (sites (values Remembered "NumToCaptureP2")))) (remember Value "NumToCaptureP2" 1) (remember Value "NumToCaptureP2" 5)))))))) origin:True)))) (end (if (no Moves Next) (byScore {(score P1 (count at:(mapEntry P1))) (score P2 (count at:(mapEntry P2)))}))))) |
2x6 board with two stores. Four counters in each hole. Sowing occurs in an anti-clockwise direction from a hole in the player's row. If the final counter falls into a hole in the opponent's row containing two counters, making it contain three, they are captured. Any holes containing three counters in an unbroken line behind it in the opponent's row are also captured. A player cannot sow into a hole from which they sowed until it has been sown into by the opponent. Play continues until no more captures are possible, and the players win the counters they captured and the counters on their side of the board. A new round begins. The player with fewer counters fills up their holes from right to left with four counters. The opponent fills the same number of holes, and continues to play, holding any remaining counters for future rounds, if necessary. Play proceeds as before with the present number of holes in play. Play continues until one player cannot fill any holes. | (game "Adi" (players 2) (equipment {(mancalaBoard 2 6 {(track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "6,W,N,E" loop:True)}) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared) (map "RightMost" {(pair P1 6) (pair P2 7)}) (map "CorrespondingHoles" {(pair 1 12) (pair 2 11) (pair 3 10) (pair 4 9) (pair 5 8) (pair 6 7) (pair 7 6) (pair 8 5) (pair 9 4) (pair 10 3) (pair 11 2) (pair 12 1)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2"))) if:(and (if (is Mover P1) (not (is In (from) (values Remembered "P1SowFrom"))) (not (is In (from) (values Remembered "P2SowFrom")))) (< 0 (count at:(from))))) (then (and {(sow "TrackCCW" if:(and (is In (to) (sites Next)) (= (count at:(to)) 3)) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) backtracking:True) (forEach Value (array (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(min 12 (count at:(last From)))))) (if (is Mover P1) (if (is In (value) (values Remembered "P2SowFrom")) (forget Value "P2SowFrom" (value))) (if (is In (value) (values Remembered "P1SowFrom")) (forget Value "P1SowFrom" (value))))) (if (is Mover P1) (remember Value "P1SowFrom" (last From)) (remember Value "P2SowFrom" (last From)))})))} (then (if (not (can Move (or (move Select (from (sites (values Remembered "OwnedP1")) if:(and (not (is In (from) (values Remembered "P1SowFrom"))) (< 0 (count at:(from)))))) (move Select (from (sites (values Remembered "OwnedP2")) if:(and (not (is In (from) (values Remembered "P2SowFrom"))) (< 0 (count at:(from))))))))) (and {(forEach Site (sites P1) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (forget Value "P1SowFrom" All) (forget Value "P2SowFrom" All) (if (>= (+ (count at:(mapEntry P2)) (count in:(sites P2))) (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (set NextPlayer (player 1)) (set NextPlayer (player 2)))}))))) (end (if (all Sites (union (sites P1) (sites P2)) if:(= 0 (count at:(site)))) {(if (> 4 (count at:(mapEntry P1))) (result P2 Win)) (if (> 4 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (all Sites (union (sites P1) (sites P2)) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:4 (then (and (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 4 (count at:(mapEntry Mover))) (moveAgain) (forEach Site (sites Mover) (if (is Occupied (site)) (and (fromTo (from (mapEntry Next)) (to (mapEntry "CorrespondingHoles" (site))) count:(count at:(site))) (if (is Next P1) (remember Value "OwnedP1" (mapEntry "CorrespondingHoles" (site))) (remember Value "OwnedP2" (mapEntry "CorrespondingHoles" (site))))))))))))) (nextPhase (> 4 (count at:(mapEntry Mover))) "Sowing"))})) | ###Description
2x6 board with two stores. Four counters in each hole. Sowing occurs in an anti-clockwise direction from a hole in the player's row. If the final counter falls into a hole in the opponent's row containing two counters, making it contain three, they are captured. Any holes containing three counters in an unbroken line behind it in the opponent's row are also captured. A player cannot sow into a hole from which they sowed until it has been sown into by the opponent. Play continues until no more captures are possible, and the players win the counters they captured and the counters on their side of the board. A new round begins. The player with fewer counters fills up their holes from right to left with four counters. The opponent fills the same number of holes, and continues to play, holding any remaining counters for future rounds, if necessary. Play proceeds as before with the present number of holes in play. Play continues until one player cannot fill any holes.
###Ludii
(game "Adi" (players 2) (equipment {(mancalaBoard 2 6 {(track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "6,W,N,E" loop:True)}) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared) (map "RightMost" {(pair P1 6) (pair P2 7)}) (map "CorrespondingHoles" {(pair 1 12) (pair 2 11) (pair 3 10) (pair 4 9) (pair 5 8) (pair 6 7) (pair 7 6) (pair 8 5) (pair 9 4) (pair 10 3) (pair 11 2) (pair 12 1)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2"))) if:(and (if (is Mover P1) (not (is In (from) (values Remembered "P1SowFrom"))) (not (is In (from) (values Remembered "P2SowFrom")))) (< 0 (count at:(from))))) (then (and {(sow "TrackCCW" if:(and (is In (to) (sites Next)) (= (count at:(to)) 3)) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) backtracking:True) (forEach Value (array (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(min 12 (count at:(last From)))))) (if (is Mover P1) (if (is In (value) (values Remembered "P2SowFrom")) (forget Value "P2SowFrom" (value))) (if (is In (value) (values Remembered "P1SowFrom")) (forget Value "P1SowFrom" (value))))) (if (is Mover P1) (remember Value "P1SowFrom" (last From)) (remember Value "P2SowFrom" (last From)))})))} (then (if (not (can Move (or (move Select (from (sites (values Remembered "OwnedP1")) if:(and (not (is In (from) (values Remembered "P1SowFrom"))) (< 0 (count at:(from)))))) (move Select (from (sites (values Remembered "OwnedP2")) if:(and (not (is In (from) (values Remembered "P2SowFrom"))) (< 0 (count at:(from))))))))) (and {(forEach Site (sites P1) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (forget Value "P1SowFrom" All) (forget Value "P2SowFrom" All) (if (>= (+ (count at:(mapEntry P2)) (count in:(sites P2))) (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (set NextPlayer (player 1)) (set NextPlayer (player 2)))}))))) (end (if (all Sites (union (sites P1) (sites P2)) if:(= 0 (count at:(site)))) {(if (> 4 (count at:(mapEntry P1))) (result P2 Win)) (if (> 4 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (all Sites (union (sites P1) (sites P2)) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:4 (then (and (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 4 (count at:(mapEntry Mover))) (moveAgain) (forEach Site (sites Mover) (if (is Occupied (site)) (and (fromTo (from (mapEntry Next)) (to (mapEntry "CorrespondingHoles" (site))) count:(count at:(site))) (if (is Next P1) (remember Value "OwnedP1" (mapEntry "CorrespondingHoles" (site))) (remember Value "OwnedP2" (mapEntry "CorrespondingHoles" (site))))))))))))) (nextPhase (> 4 (count at:(mapEntry Mover))) "Sowing"))})) |
2x6 board with two stores. Four counters in each hole. Sowing occurs in an anti-clockwise direction. When the final counter lands in a hole containing one or two counters, thus making it contain two or three counters, these are captured. When this capture is made, other holes with two or three counters in them, in an uninterrupted sequence behind the hole from which the first capture was made, are captured. The player who captures the most counters wins. | (game "Adidada" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow if:(and (is In (to) (sites Next)) (or (= (count at:(to)) 2) (= (count at:(to)) 3))) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) backtracking:True)))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
2x6 board with two stores. Four counters in each hole. Sowing occurs in an anti-clockwise direction. When the final counter lands in a hole containing one or two counters, thus making it contain two or three counters, these are captured. When this capture is made, other holes with two or three counters in them, in an uninterrupted sequence behind the hole from which the first capture was made, are captured. The player who captures the most counters wins.
###Ludii
(game "Adidada" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow if:(and (is In (to) (sites Next)) (or (= (count at:(to)) 2) (= (count at:(to)) 3))) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) backtracking:True)))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(mapEntry P2)) (count in:(sites P2))))}))))) |
2x5 board. Ten counters in each hole. Sowing occurs in an anti-clockwise direction, sowing first into the hole from which the counters originally came. Opening phase: In the first ten turns, each player must sow from each of their five holes. Main phase: Captures are made when the last counter of a sowing falls into a hole preceding a hole containing one, three, or five counters. These counters are taken. Any subsequent holes also containing one, three, or five counters are captured, until a hole is reached that does not have one of these numbers of counters. The exception to this is in the first move when no captures are made. Sowing cannot begin from a hole with a single counter. A player wins when his opponent can no longer sow. However, if a player can no longer move, they can redistribute their captured beans into their holes, and if all five can be filled with ten, the game is a draw. | (game "Adjiboto" (players 2) (equipment {(mancalaBoard 2 5 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 10 to:(sites Track))) phases:{(phase "Opening" (play (move Select (from (difference (sites Mover) (sites (if (is Mover P1) (values Remembered "SowedHolesP1") (values Remembered "SowedHolesP2")))) if:(< 1 (count at:(to)))) (then (and (sow origin:True) (if (is Mover P1) (remember Value "SowedHolesP1" (last From) unique:True) (remember Value "SowedHolesP2" (last From) unique:True)))))) (nextPhase Mover (< 8 (count Turns)))) (phase "Main" (play (move Select (from (sites Mover) if:(< 1 (count at:(to)))) (then (sow if:(or {(= 1 (count at:(trackSite Move from:(to) "Track" steps:1))) (= 3 (count at:(trackSite Move from:(to) "Track" steps:1))) (= 5 (count at:(trackSite Move from:(to) "Track" steps:1)))}) apply:(fromTo (from (trackSite Move from:(to) "Track" steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "Track" steps:1))) origin:True forward:True)))) (end (if (no Moves Next) {(if (< (count Cell at:(handSite Next)) 50) (result Mover Win)) (if (>= (count Cell at:(handSite Next)) 50) (result Mover Draw))})))})) | ###Description
2x5 board. Ten counters in each hole. Sowing occurs in an anti-clockwise direction, sowing first into the hole from which the counters originally came. Opening phase: In the first ten turns, each player must sow from each of their five holes. Main phase: Captures are made when the last counter of a sowing falls into a hole preceding a hole containing one, three, or five counters. These counters are taken. Any subsequent holes also containing one, three, or five counters are captured, until a hole is reached that does not have one of these numbers of counters. The exception to this is in the first move when no captures are made. Sowing cannot begin from a hole with a single counter. A player wins when his opponent can no longer sow. However, if a player can no longer move, they can redistribute their captured beans into their holes, and if all five can be filled with ten, the game is a draw.
###Ludii
(game "Adjiboto" (players 2) (equipment {(mancalaBoard 2 5 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 10 to:(sites Track))) phases:{(phase "Opening" (play (move Select (from (difference (sites Mover) (sites (if (is Mover P1) (values Remembered "SowedHolesP1") (values Remembered "SowedHolesP2")))) if:(< 1 (count at:(to)))) (then (and (sow origin:True) (if (is Mover P1) (remember Value "SowedHolesP1" (last From) unique:True) (remember Value "SowedHolesP2" (last From) unique:True)))))) (nextPhase Mover (< 8 (count Turns)))) (phase "Main" (play (move Select (from (sites Mover) if:(< 1 (count at:(to)))) (then (sow if:(or {(= 1 (count at:(trackSite Move from:(to) "Track" steps:1))) (= 3 (count at:(trackSite Move from:(to) "Track" steps:1))) (= 5 (count at:(trackSite Move from:(to) "Track" steps:1)))}) apply:(fromTo (from (trackSite Move from:(to) "Track" steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "Track" steps:1))) origin:True forward:True)))) (end (if (no Moves Next) {(if (< (count Cell at:(handSite Next)) 50) (result Mover Win)) (if (>= (count Cell at:(handSite Next)) 50) (result Mover Draw))})))})) |
Played on a board with two rows of five holes with store holes on either side. To start, ten counters are placed in each hole except the stores. Play begins from any of a player's holes, and sowing proceeds in either direction, at the player's choice. The first seed is sown in the hole from which play started. When the last counter of a sowing falls into a hole, making the contents of that hole odd (but not more than nine), the counters are captured. The first capture must be of three counters, the second of one counter. The first capture must be of three counters, the second of one counter. | (game "Ako Okwe" (players 2) (equipment {(mancalaBoard 2 5 {(track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "6,E,S,W" loop:True)}) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 10 to:(sites Track))) (play (or (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow "TrackCW" if:(or {(and {(<= (count at:(to)) 9) (is Odd (count at:(to))) (>= (value Player Mover) 2)}) (and (= (value Player Mover) -1) (= (count at:(to)) 3)) (and (= (value Player Mover) 1) (= (count at:(to)) 1))}) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to)) (then (and (if (= (value Player Mover) 1) (set Value Mover 2)) (if (= (value Player Mover) -1) (set Value Mover 1))))) origin:True))) (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow "TrackCCW" if:(or {(and {(<= (count at:(to)) 9) (is Odd (count at:(to))) (>= (value Player Mover) 2)}) (and (= (value Player Mover) -1) (= (count at:(to)) 3)) (and (= (value Player Mover) 1) (= (count at:(to)) 1))}) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to)) (then (and (if (= (value Player Mover) 1) (set Value Mover 2)) (if (= (value Player Mover) -1) (set Value Mover 1))))) origin:True))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
Played on a board with two rows of five holes with store holes on either side. To start, ten counters are placed in each hole except the stores. Play begins from any of a player's holes, and sowing proceeds in either direction, at the player's choice. The first seed is sown in the hole from which play started. When the last counter of a sowing falls into a hole, making the contents of that hole odd (but not more than nine), the counters are captured. The first capture must be of three counters, the second of one counter. The first capture must be of three counters, the second of one counter.
###Ludii
(game "Ako Okwe" (players 2) (equipment {(mancalaBoard 2 5 {(track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "6,E,S,W" loop:True)}) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 10 to:(sites Track))) (play (or (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow "TrackCW" if:(or {(and {(<= (count at:(to)) 9) (is Odd (count at:(to))) (>= (value Player Mover) 2)}) (and (= (value Player Mover) -1) (= (count at:(to)) 3)) (and (= (value Player Mover) 1) (= (count at:(to)) 1))}) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to)) (then (and (if (= (value Player Mover) 1) (set Value Mover 2)) (if (= (value Player Mover) -1) (set Value Mover 1))))) origin:True))) (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow "TrackCCW" if:(or {(and {(<= (count at:(to)) 9) (is Odd (count at:(to))) (>= (value Player Mover) 2)}) (and (= (value Player Mover) -1) (= (count at:(to)) 3)) (and (= (value Player Mover) 1) (= (count at:(to)) 1))}) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to)) (then (and (if (= (value Player Mover) 1) (set Value Mover 2)) (if (= (value Player Mover) -1) (set Value Mover 1))))) origin:True))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
2x6 board. Three counters in each hole. Sowing occurs from one of the holes in the player's row. If the final counter lands in an occupied hole, these counters are picked up and sowing continues. If the final counter lands in an empty hole in the player's own row, any counters in the opposite row hole are captured. A player wins when the opponent's row is empty. | (game "Altiev" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 3 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (> (count at:(to)) 1) (moveAgain) (if (is In (to) (sites Mover)) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))))))))) (end {(if (all Sites (sites P1) if:(= 0 (count at:(site)))) (result P2 Win)) (if (all Sites (sites P2) if:(= 0 (count at:(site)))) (result P1 Win))}))) | ###Description
2x6 board. Three counters in each hole. Sowing occurs from one of the holes in the player's row. If the final counter lands in an occupied hole, these counters are picked up and sowing continues. If the final counter lands in an empty hole in the player's own row, any counters in the opposite row hole are captured. A player wins when the opponent's row is empty.
###Ludii
(game "Altiev" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 3 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (> (count at:(to)) 1) (moveAgain) (if (is In (to) (sites Mover)) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))))))))) (end {(if (all Sites (sites P1) if:(= 0 (count at:(site)))) (result P2 Win)) (if (all Sites (sites P2) if:(= 0 (count at:(site)))) (result P1 Win))}))) |
2x12, 15, 18, 21, or 24 board. Two counters per hole. Typically played by a team of players, who consult each other about the moves to be made. Sowing occurs most commonly in an anti-clockwise direction, but can be played clockwise if the players agree. Play begins with one player picking up the counters in one of the holes in their row and sowing them, then picking up the counters in the hole following the one in which the last counter was sown, and continuing to sow in this way until there is a pattern of holes with three counters alternating with empty holes. The players then decide who gets to play first. Players sow counters from a hole in their row in the agreed-upon direction. When the final counter lands in an occupied hole, these counters are picked up and sowing continues. When the last counter falls into an empty hole, the sowing ends. If the sowing ends in the player's own row, any counters in the opponent's hole opposite are captured. Once both players are reduced to only single counters in their holes, when a player reaches the end of their row with a counter, it is captured instead of continuing to sow it to the opponent's rows. The player who is the last in possession of counters wins. Each player has 12 holes and sow anti-clockwise. | (game "Andada" (players 2) (equipment {(mancalaBoard 2 12 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 2 to:(sites Track))) phases:{(phase "Opening" (play (move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) "Track" steps:1)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow (then (if (is Occupied (trackSite Move from:(last To afterConsequence:True) "Track" steps:1)) (moveAgain))))))) (nextPhase (is Mover P2) "Playing")) (phase "Playing" (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (= 1 (count at:(to))) (if (all Sites (sites Board) if:(<= (count at:(site)) 1)) (if (is In (trackSite Move from:(to) "Track" steps:1) (sites Next)) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) (if (and (is Occupied (if (is Mover P1) (+ (to) 12) (- (to) 12))) (is In (to) (sites Mover))) (fromTo (from (if (is Mover P1) (+ (to) 12) (- (to) 12))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 12) (- (to) 12)))))) (moveAgain)))))) (end (forEach Player if:(all Sites (sites Player) if:(= 0 (count at:(site)))) (result Player Loss))))})) | ###Description
2x12, 15, 18, 21, or 24 board. Two counters per hole. Typically played by a team of players, who consult each other about the moves to be made. Sowing occurs most commonly in an anti-clockwise direction, but can be played clockwise if the players agree. Play begins with one player picking up the counters in one of the holes in their row and sowing them, then picking up the counters in the hole following the one in which the last counter was sown, and continuing to sow in this way until there is a pattern of holes with three counters alternating with empty holes. The players then decide who gets to play first. Players sow counters from a hole in their row in the agreed-upon direction. When the final counter lands in an occupied hole, these counters are picked up and sowing continues. When the last counter falls into an empty hole, the sowing ends. If the sowing ends in the player's own row, any counters in the opponent's hole opposite are captured. Once both players are reduced to only single counters in their holes, when a player reaches the end of their row with a counter, it is captured instead of continuing to sow it to the opponent's rows. The player who is the last in possession of counters wins. Each player has 12 holes and sow anti-clockwise.
###Ludii
(game "Andada" (players 2) (equipment {(mancalaBoard 2 12 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 2 to:(sites Track))) phases:{(phase "Opening" (play (move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) "Track" steps:1)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow (then (if (is Occupied (trackSite Move from:(last To afterConsequence:True) "Track" steps:1)) (moveAgain))))))) (nextPhase (is Mover P2) "Playing")) (phase "Playing" (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (= 1 (count at:(to))) (if (all Sites (sites Board) if:(<= (count at:(site)) 1)) (if (is In (trackSite Move from:(to) "Track" steps:1) (sites Next)) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) (if (and (is Occupied (if (is Mover P1) (+ (to) 12) (- (to) 12))) (is In (to) (sites Mover))) (fromTo (from (if (is Mover P1) (+ (to) 12) (- (to) 12))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 12) (- (to) 12)))))) (moveAgain)))))) (end (forEach Player if:(all Sites (sites Player) if:(= 0 (count at:(site)))) (result Player Loss))))})) |
2x6 board. Four counters per hole. Players sow in a clockwise direction from their left three holes or anti-clockwise from their right three holes. When the final counter of a sowing falls into a hole in the opponent's row or in the leftmost or rightmost hole of the player's own row, which contains three counters, making it now contain four, this hole is marked and counters cannot be sown from this hole. Sowing cannot occur from a hole with a single counter into a hole containing three in the opponent's row, but is allowed when the hole containing three is in the player's own row. A player cannot sow a lone counter that was sown into their row by the opponent on the previous turn back into the hole from which it was just moved. If a player is unable to sow from their row, the opponent may continue to play until the player is able to move. Play continues until all of the counters are in marked holes. The player with the most counters in their marked holes wins. | (game "Andot" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (regions "LeftThree" P1 (expand (intersection (sites Bottom) (sites Left)) steps:2 E)) (regions "LeftThree" P2 (expand (intersection (sites Top) (sites Right)) steps:2 W)) (regions "RightThree" P1 (expand (intersection (sites Bottom) (sites Right)) steps:2 W)) (regions "RightThree" P2 (expand (intersection (sites Top) (sites Left)) steps:2 E)) (regions "ExtremeHoles" P1 (intersection (union (sites Left) (sites Right)) (sites Bottom))) (regions "ExtremeHoles" P2 (intersection (union (sites Left) (sites Right)) (sites Top))) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Board))) (play (or (move Select (from (sites Mover "LeftThree") if:(and (or (and (= (count at:(from)) 1) (and (!= (from) (trackSite Move from:(last From) "TrackCCW" steps:1)) (if (is In (trackSite Move from:(from) "TrackCW" steps:1) (sites Next "Home")) (!= (count at:(trackSite Move from:(from) "TrackCW" steps:1)) 3) True))) (> (count at:(from)) 1)) (= 0 (state at:(from))))) (then (sow "TrackCW" apply:(if (and (= (count at:(to)) 4) (is In (to) (union (sites Mover "ExtremeHoles") (sites Next "Home")))) (set State at:(to) (mover)))))) (move Select (from (sites Mover "RightThree") if:(and (or (and (= (count at:(from)) 1) (and (!= (from) (trackSite Move from:(last From) "TrackCW" steps:1)) (if (is In (trackSite Move from:(from) "TrackCCW" steps:1) (sites Next "Home")) (!= (count at:(trackSite Move from:(from) "TrackCCW" steps:1)) 3) True))) (> (count at:(from)) 1)) (= 0 (state at:(from))))) (then (sow "TrackCCW" apply:(if (and (= (count at:(to)) 4) (is In (to) (union (sites Mover "ExtremeHoles") (sites Next "Home")))) (set State at:(to) (mover)))))))) (end (if (= 0 (count in:(forEach (sites Board) if:(= 0 (state at:(site)))))) (byScore {(score P1 (count in:(forEach (sites Board) if:(= (id P1) (state at:(site)))))) (score P2 (count in:(forEach (sites Board) if:(= (id P2) (state at:(site))))))}))))) | ###Description
2x6 board. Four counters per hole. Players sow in a clockwise direction from their left three holes or anti-clockwise from their right three holes. When the final counter of a sowing falls into a hole in the opponent's row or in the leftmost or rightmost hole of the player's own row, which contains three counters, making it now contain four, this hole is marked and counters cannot be sown from this hole. Sowing cannot occur from a hole with a single counter into a hole containing three in the opponent's row, but is allowed when the hole containing three is in the player's own row. A player cannot sow a lone counter that was sown into their row by the opponent on the previous turn back into the hole from which it was just moved. If a player is unable to sow from their row, the opponent may continue to play until the player is able to move. Play continues until all of the counters are in marked holes. The player with the most counters in their marked holes wins.
###Ludii
(game "Andot" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (regions "LeftThree" P1 (expand (intersection (sites Bottom) (sites Left)) steps:2 E)) (regions "LeftThree" P2 (expand (intersection (sites Top) (sites Right)) steps:2 W)) (regions "RightThree" P1 (expand (intersection (sites Bottom) (sites Right)) steps:2 W)) (regions "RightThree" P2 (expand (intersection (sites Top) (sites Left)) steps:2 E)) (regions "ExtremeHoles" P1 (intersection (union (sites Left) (sites Right)) (sites Bottom))) (regions "ExtremeHoles" P2 (intersection (union (sites Left) (sites Right)) (sites Top))) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Board))) (play (or (move Select (from (sites Mover "LeftThree") if:(and (or (and (= (count at:(from)) 1) (and (!= (from) (trackSite Move from:(last From) "TrackCCW" steps:1)) (if (is In (trackSite Move from:(from) "TrackCW" steps:1) (sites Next "Home")) (!= (count at:(trackSite Move from:(from) "TrackCW" steps:1)) 3) True))) (> (count at:(from)) 1)) (= 0 (state at:(from))))) (then (sow "TrackCW" apply:(if (and (= (count at:(to)) 4) (is In (to) (union (sites Mover "ExtremeHoles") (sites Next "Home")))) (set State at:(to) (mover)))))) (move Select (from (sites Mover "RightThree") if:(and (or (and (= (count at:(from)) 1) (and (!= (from) (trackSite Move from:(last From) "TrackCW" steps:1)) (if (is In (trackSite Move from:(from) "TrackCCW" steps:1) (sites Next "Home")) (!= (count at:(trackSite Move from:(from) "TrackCCW" steps:1)) 3) True))) (> (count at:(from)) 1)) (= 0 (state at:(from))))) (then (sow "TrackCCW" apply:(if (and (= (count at:(to)) 4) (is In (to) (union (sites Mover "ExtremeHoles") (sites Next "Home")))) (set State at:(to) (mover)))))))) (end (if (= 0 (count in:(forEach (sites Board) if:(= 0 (state at:(site)))))) (byScore {(score P1 (count in:(forEach (sites Board) if:(= (id P1) (state at:(site)))))) (score P2 (count in:(forEach (sites Board) if:(= (id P2) (state at:(site))))))}))))) |
Play begins with each hole (except the large holes on the ends) holding 3 counters (usually seeds or stones), though 2 or 5 are also acceptable. A player picks up all of the counters in one of the holes on their side, depositing one in each consecutive hole in a counterclockwise manner. If the last counter is placed in a hole with one less than the original starting number of counters (thus making the number of counters equal to the starting number), the player "makes a fish" (ára ot-tjin) and captures the pieces in that hole. Sowing cannot begin from.a hole containing a single counter. Play continues until one player cannot play, at which point their opponent captures the remaining counters on the board. The player with the most captured counters wins. If both players have only single counters in their holes, they must play again. The game starts with 3 counters. | (game "Aw-li On-nam Ot-tjin" (players 2) (equipment {(mancalaBoard 2 9 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 3 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 1)) (then (sow if:(= (count at:(to)) 3) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))))))) (end (if (no Moves Mover) {(if (no Moves Next) (result Mover Draw)) (if (is Mover P1) (byScore {(score P1 (count at:(mapEntry P1))) (score P2 (+ {(count at:(mapEntry P1)) (count in:(sites P1)) (count in:(sites P2))}))})) (if (is Mover P2) (byScore {(score P1 (+ {(count at:(mapEntry P2)) (count in:(sites P2)) (count in:(sites P1))})) (score P2 (count at:(mapEntry P2)))}))})))) | ###Description
Play begins with each hole (except the large holes on the ends) holding 3 counters (usually seeds or stones), though 2 or 5 are also acceptable. A player picks up all of the counters in one of the holes on their side, depositing one in each consecutive hole in a counterclockwise manner. If the last counter is placed in a hole with one less than the original starting number of counters (thus making the number of counters equal to the starting number), the player "makes a fish" (ára ot-tjin) and captures the pieces in that hole. Sowing cannot begin from.a hole containing a single counter. Play continues until one player cannot play, at which point their opponent captures the remaining counters on the board. The player with the most captured counters wins. If both players have only single counters in their holes, they must play again. The game starts with 3 counters.
###Ludii
(game "Aw-li On-nam Ot-tjin" (players 2) (equipment {(mancalaBoard 2 9 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 3 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 1)) (then (sow if:(= (count at:(to)) 3) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))))))) (end (if (no Moves Mover) {(if (no Moves Next) (result Mover Draw)) (if (is Mover P1) (byScore {(score P1 (count at:(mapEntry P1))) (score P2 (+ {(count at:(mapEntry P1)) (count in:(sites P1)) (count in:(sites P2))}))})) (if (is Mover P2) (byScore {(score P1 (+ {(count at:(mapEntry P2)) (count in:(sites P2)) (count in:(sites P1))})) (score P2 (count at:(mapEntry P2)))}))})))) |
2x6 board. Play begins with four counters in each hole. A player picks up the contents of any of their holes and sowing them in an anti-clockwise direction, picking up the contents of the last hole in which his counters fall, and continuing sowing. This continues until the last counter falls in an empty hole. Then it is the other player's turn. A hole is captured when the last ball is dropped into an opponent's hole containing three counters, making it four. A player cannot then take from one of these holes that they have captured. Therefore, the player cannot begin a turn from their own captured hole nor can they continue sowing from it. If the last counter of a sowing falls into an opponent's captured hole, nothing happens on the first instance, but every time after that, one of those counters are removed from the board and placed in the store, and the sowing ends. Ownership of a hole continues even if it becomes empty. When a player cannot move (i.e., there are no counters in their holes except any that are in captured holes), the opponent continues to move until the player is able to move. Play continues until all counters are either placed in the store or in captured holes and thus cannot be moved. Players then count their pieces by placing four in each hole, and the player who has more than their original number takes ownership of one of the opponent's holes for every four counters more than the original number that have been taken. If no player took four more than the original, the player with three extra gets the hole, if each player has two extra the weaker player is given the two extra counters. Play then begins again as before. The game ends when one player owns all of the counters, and thus all of the holes. | (game "Awagagae" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 4 to:(sites Track))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(and (if (is Mover P1) (not (is In (from) (values Remembered "CapturedP2"))) (not (is In (from) (values Remembered "CapturedP1")))) (< 0 (count at:(from))))) (then (sow "Track" apply:(if (not (if (= (mover) P1) (is In (to) (values Remembered "CapturedP1")) (is In (to) (values Remembered "CapturedP2")))) (if (and (is In (to) (sites Next)) (= (count at:(to)) 4)) (if (is Mover P1) (remember Value "CapturedP1" (to)) (remember Value "CapturedP2" (to))) (if (if (= (mover) P1) (is In (to) (values Remembered "CapturedP2")) (is In (to) (values Remembered "CapturedP1"))) (fromTo (from (to)) (to (handSite Next)) count:1) (if (> (count at:(to)) 1) (moveAgain))))))))} (then (if (no Pieces in:(forEach (sites Board) if:(and (not (is In (site) (values Remembered "CapturedP1"))) (not (is In (site) (values Remembered "CapturedP2")))))) (and {(forEach Site (sites Board) (if (and (is In (site) (values Remembered "CapturedP1")) (is Occupied (site))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites Board) (if (and (is In (site) (values Remembered "CapturedP2")) (is Occupied (site))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (forget Value "CapturedP1" All) (forget Value "CapturedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (if (all Sites (sites Mover) if:(is Occupied (site))) (sites Next) (sites Mover)) if:(is Empty (to))) count:4 (then (and (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (and (> 4 (count Cell at:(handSite P1))) (> 4 (count Cell at:(handSite P2)))) (and {(fromTo (from Cell (handSite P1)) (to (sites Empty)) count:(count Cell at:(handSite P1))) (fromTo (from Cell (handSite P2)) (to (sites Empty)) count:(count Cell at:(handSite P2))) (if (= 3 (count Cell at:(handSite P1))) (remember Value "OwnedP1" (regionSite (sites Empty) index:0)) (remember Value "OwnedP2" (regionSite (sites Empty) index:0)))}))))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) | ###Description
2x6 board. Play begins with four counters in each hole. A player picks up the contents of any of their holes and sowing them in an anti-clockwise direction, picking up the contents of the last hole in which his counters fall, and continuing sowing. This continues until the last counter falls in an empty hole. Then it is the other player's turn. A hole is captured when the last ball is dropped into an opponent's hole containing three counters, making it four. A player cannot then take from one of these holes that they have captured. Therefore, the player cannot begin a turn from their own captured hole nor can they continue sowing from it. If the last counter of a sowing falls into an opponent's captured hole, nothing happens on the first instance, but every time after that, one of those counters are removed from the board and placed in the store, and the sowing ends. Ownership of a hole continues even if it becomes empty. When a player cannot move (i.e., there are no counters in their holes except any that are in captured holes), the opponent continues to move until the player is able to move. Play continues until all counters are either placed in the store or in captured holes and thus cannot be moved. Players then count their pieces by placing four in each hole, and the player who has more than their original number takes ownership of one of the opponent's holes for every four counters more than the original number that have been taken. If no player took four more than the original, the player with three extra gets the hole, if each player has two extra the weaker player is given the two extra counters. Play then begins again as before. The game ends when one player owns all of the counters, and thus all of the holes.
###Ludii
(game "Awagagae" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 4 to:(sites Track))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(and (if (is Mover P1) (not (is In (from) (values Remembered "CapturedP2"))) (not (is In (from) (values Remembered "CapturedP1")))) (< 0 (count at:(from))))) (then (sow "Track" apply:(if (not (if (= (mover) P1) (is In (to) (values Remembered "CapturedP1")) (is In (to) (values Remembered "CapturedP2")))) (if (and (is In (to) (sites Next)) (= (count at:(to)) 4)) (if (is Mover P1) (remember Value "CapturedP1" (to)) (remember Value "CapturedP2" (to))) (if (if (= (mover) P1) (is In (to) (values Remembered "CapturedP2")) (is In (to) (values Remembered "CapturedP1"))) (fromTo (from (to)) (to (handSite Next)) count:1) (if (> (count at:(to)) 1) (moveAgain))))))))} (then (if (no Pieces in:(forEach (sites Board) if:(and (not (is In (site) (values Remembered "CapturedP1"))) (not (is In (site) (values Remembered "CapturedP2")))))) (and {(forEach Site (sites Board) (if (and (is In (site) (values Remembered "CapturedP1")) (is Occupied (site))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites Board) (if (and (is In (site) (values Remembered "CapturedP2")) (is Occupied (site))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (forget Value "CapturedP1" All) (forget Value "CapturedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (if (all Sites (sites Mover) if:(is Occupied (site))) (sites Next) (sites Mover)) if:(is Empty (to))) count:4 (then (and (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (and (> 4 (count Cell at:(handSite P1))) (> 4 (count Cell at:(handSite P2)))) (and {(fromTo (from Cell (handSite P1)) (to (sites Empty)) count:(count Cell at:(handSite P1))) (fromTo (from Cell (handSite P2)) (to (sites Empty)) count:(count Cell at:(handSite P2))) (if (= 3 (count Cell at:(handSite P1))) (remember Value "OwnedP1" (regionSite (sites Empty) index:0)) (remember Value "OwnedP2" (regionSite (sites Empty) index:0)))}))))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) |
2x6 board. Four counters in each hole. Sowing occurs in an anti-clockwise direction. The hole from which sowing begins must remain empty throughout the player's turn. Captures are made when the last counter of a sowing fall into the opponent's row in a hole containing one or two counters (thus making two or three), capturing all of the counters in that hole. A continuous series of holes holding two or three counters behind it are also captured, provided the player's sowing caused them to contain this number. If a player has no counters in their holes, the opponent must play to place seeds in their row, if possible. The game ends when players have holes with only empty and single counters. The player who captured the most counters wins. | (game "Awari" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (do (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow if:(and (is In (to) (sites Next)) (or (= (count at:(to)) 2) (= (count at:(to)) 3))) apply:(fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) includeSelf:False backtracking:True))) ifAfterwards:(< 0 (count in:(sites Next))))) (end (if (all Sites (sites Track) if:(<= (count at:(site)) 1)) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) | ###Description
2x6 board. Four counters in each hole. Sowing occurs in an anti-clockwise direction. The hole from which sowing begins must remain empty throughout the player's turn. Captures are made when the last counter of a sowing fall into the opponent's row in a hole containing one or two counters (thus making two or three), capturing all of the counters in that hole. A continuous series of holes holding two or three counters behind it are also captured, provided the player's sowing caused them to contain this number. If a player has no counters in their holes, the opponent must play to place seeds in their row, if possible. The game ends when players have holes with only empty and single counters. The player who captured the most counters wins.
###Ludii
(game "Awari" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (do (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow if:(and (is In (to) (sites Next)) (or (= (count at:(to)) 2) (= (count at:(to)) 3))) apply:(fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) includeSelf:False backtracking:True))) ifAfterwards:(< 0 (count in:(sites Next))))) (end (if (all Sites (sites Track) if:(<= (count at:(site)) 1)) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) |
2x20 board. Opening arrangement: Each player has this opening arrangement (number of counters in each hole, starting from the leftmost hole): 5-5-5-5-5-5-5-1-1-5-2-1-0-0-0-0-0-0-0-0. Opening phase: Players remove the counters in their final four holes with counters and conceals them from the opponent. Players take the counters from any of their holes and sow them in an anti-clockwise direction. When sowing, the first counter is dropped into the hole from which it just came, unless it is a single counter. If the last counter lands in the opponent's row and this hole contains one or three, counters, these are taken and added to the concealed store. Also, if the hole from which a capture was made is preceded by an unbroken sequence of holes with one or three counters, these are also taken. In place of a move, a player may add all of the counters from the concealed store, sowing from the leftmost hole in their row. If the sowing reaches the rightmost hole in this row, sowing may continue from the leftmost hole or may continue into the opponent's row. If the player continues into the opponent's row, subsequent holes after the one in which the final counter was dropped are captured if they contain one or three counters, in an unbroken sequence. | (game "Azigo" (players 2) (equipment {(mancalaBoard 2 20 store:None {(track "Track" "0,E,N,W" loop:True) (track "TrackSpecialHome1" "0,E" loop:True P1) (track "TrackSpecialHome2" "39,W" loop:True P2)}) (piece "Seed" Shared) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 39)}) (regions "OpeningRegion" P1 (sites {8 9 10 11})) (regions "OpeningRegion" P2 (sites {28 29 30 31})) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(set Count 5 to:(sites {0 1 2 3 4 5 6 9 39 38 37 36 35 34 33 30})) (set Count 1 to:(sites {7 8 11 32 31 28})) (set Count 2 to:(sites {10 29}))}) phases:{(phase "Opening" (play (move (from (sites Mover "OpeningRegion") if:(is Occupied (from))) (to (handSite Mover)) count:(count at:(from)))) (nextPhase Mover (all Sites (sites Mover "OpeningRegion") if:(is Empty (site))) "Sowing")) (phase "Sowing" (play (or (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow "Track" apply:(if (and (is In (to) (sites Next)) (or (= 2 (count at:(to))) (= 4 (count at:(to))))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) origin:(< 1 (count at:(from))) backtracking:True))) (if (is Occupied Cell (handSite Mover)) (or (do (set Var "NumToSow" (count Cell at:(handSite Mover))) next:(move (from (handSite Mover)) (to (mapEntry "LeftMost" Mover)) count:(count Cell at:(handSite Mover)) (then (and (sow count:(var "NumToSow") "Track" if:(and (is In (to) (sites Next)) (or (= 2 (count at:(to))) (= 4 (count at:(to))))) apply:(if (and (is In (to) (sites Next)) (or (= 2 (count at:(to))) (= 4 (count at:(to))))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) origin:True forward:True) (set Var "NumToSow" 0))))) (do (set Var "NumToSow" (count Cell at:(handSite Mover))) next:(move (from (handSite Mover)) (to (mapEntry "LeftMost" Mover)) count:(count Cell at:(handSite Mover)) (then (and (sow count:(var "NumToSow") "TrackSpecialHome" owner:(mover) origin:True) (set Var "NumToSow" 0))))))))))} (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) | ###Description
2x20 board. Opening arrangement: Each player has this opening arrangement (number of counters in each hole, starting from the leftmost hole): 5-5-5-5-5-5-5-1-1-5-2-1-0-0-0-0-0-0-0-0. Opening phase: Players remove the counters in their final four holes with counters and conceals them from the opponent. Players take the counters from any of their holes and sow them in an anti-clockwise direction. When sowing, the first counter is dropped into the hole from which it just came, unless it is a single counter. If the last counter lands in the opponent's row and this hole contains one or three, counters, these are taken and added to the concealed store. Also, if the hole from which a capture was made is preceded by an unbroken sequence of holes with one or three counters, these are also taken. In place of a move, a player may add all of the counters from the concealed store, sowing from the leftmost hole in their row. If the sowing reaches the rightmost hole in this row, sowing may continue from the leftmost hole or may continue into the opponent's row. If the player continues into the opponent's row, subsequent holes after the one in which the final counter was dropped are captured if they contain one or three counters, in an unbroken sequence.
###Ludii
(game "Azigo" (players 2) (equipment {(mancalaBoard 2 20 store:None {(track "Track" "0,E,N,W" loop:True) (track "TrackSpecialHome1" "0,E" loop:True P1) (track "TrackSpecialHome2" "39,W" loop:True P2)}) (piece "Seed" Shared) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 39)}) (regions "OpeningRegion" P1 (sites {8 9 10 11})) (regions "OpeningRegion" P2 (sites {28 29 30 31})) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(set Count 5 to:(sites {0 1 2 3 4 5 6 9 39 38 37 36 35 34 33 30})) (set Count 1 to:(sites {7 8 11 32 31 28})) (set Count 2 to:(sites {10 29}))}) phases:{(phase "Opening" (play (move (from (sites Mover "OpeningRegion") if:(is Occupied (from))) (to (handSite Mover)) count:(count at:(from)))) (nextPhase Mover (all Sites (sites Mover "OpeningRegion") if:(is Empty (site))) "Sowing")) (phase "Sowing" (play (or (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow "Track" apply:(if (and (is In (to) (sites Next)) (or (= 2 (count at:(to))) (= 4 (count at:(to))))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) origin:(< 1 (count at:(from))) backtracking:True))) (if (is Occupied Cell (handSite Mover)) (or (do (set Var "NumToSow" (count Cell at:(handSite Mover))) next:(move (from (handSite Mover)) (to (mapEntry "LeftMost" Mover)) count:(count Cell at:(handSite Mover)) (then (and (sow count:(var "NumToSow") "Track" if:(and (is In (to) (sites Next)) (or (= 2 (count at:(to))) (= 4 (count at:(to))))) apply:(if (and (is In (to) (sites Next)) (or (= 2 (count at:(to))) (= 4 (count at:(to))))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) origin:True forward:True) (set Var "NumToSow" 0))))) (do (set Var "NumToSow" (count Cell at:(handSite Mover))) next:(move (from (handSite Mover)) (to (mapEntry "LeftMost" Mover)) count:(count Cell at:(handSite Mover)) (then (and (sow count:(var "NumToSow") "TrackSpecialHome" owner:(mover) origin:True) (set Var "NumToSow" 0))))))))))} (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) |
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. | (game "Baqura" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (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 (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Sowing")) (phase "Sowing" (play (if (not (all Sites (sites Mover) if:(= 0 (count at:(site))))) (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (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:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) 0) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))))) (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 (< (+ (count Cell at:(handSite P1)) (count in:(sites P1))) (+ (count Cell at:(handSite P2)) (count in:(sites 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 (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) (forEach Site (sites Mover) (if (is Occupied (site)) (fromTo (from Cell (handSite Next)) (to (if (is In (site) (sites Bottom)) (+ (site) 6) (- (site) 6))) count:(count at:(site))))) (moveAgain))))) (nextPhase (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Sowing"))} (end (forEach Player if:(= 0 (+ (count Cell at:(handSite Player)) (count in:(sites Player)))) (result Player Loss))))) | ###Description
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.
###Ludii
(game "Baqura" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (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 (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Sowing")) (phase "Sowing" (play (if (not (all Sites (sites Mover) if:(= 0 (count at:(site))))) (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (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:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) 0) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))))) (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 (< (+ (count Cell at:(handSite P1)) (count in:(sites P1))) (+ (count Cell at:(handSite P2)) (count in:(sites 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 (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) (forEach Site (sites Mover) (if (is Occupied (site)) (fromTo (from Cell (handSite Next)) (to (if (is In (site) (sites Bottom)) (+ (site) 6) (- (site) 6))) count:(count at:(site))))) (moveAgain))))) (nextPhase (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Sowing"))} (end (forEach Player if:(= 0 (+ (count Cell at:(handSite Player)) (count in:(sites Player)))) (result Player Loss))))) |
2x4 board with two stores on either end, the store on a player's right belonging to them. Four counters per hole, five in each store. Players sow in the direction of their choosing from one of the holes in their row, not from the stores, on each turn, sowing also into the stores. If the next hole has counters, these are picked up and sowing continues with these counters. When this next hole is empty, the counters in the next hole after that are captured and the turn ends. If there are a series of alternating empty holes and holes with counters, the counters in these holes are captured until two empty or full holes are reached. When the point of the game is reached that play cannot continue, the players claim the counters in their holes, and a new game begins. The players refill their holes, beginning with their store, which receives five counters, and four in each other. Holes are only filled with exactly four counters, any extra are set aside. If a player cannot fill any of their holes with counters, these holes are eliminated from play. Play continues in this way until one player captures all of the counters or the other player cannot fill any holes. | (game "Bay Khom" (players 2) (equipment {(mancalaBoard 2 4 {(track "TrackCW" "0,5,E,9,4,W" loop:True) (track "TrackCCW" "0,1,E,9,8,W" loop:True)}) (piece "Seed" Shared) (map {(pair P1 LastSite) (pair P2 FirstSite)}) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start {(set Count 4 to:(union (sites P1) (sites P2))) (set Count 5 at:(mapEntry 1)) (set Count 5 at:(mapEntry 2)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or (if (or (<= (var "Direction") 0) (= (var "Direction") 1)) (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (sow "TrackCW" apply:(if (is Occupied (trackSite Move from:(to) "TrackCW" steps:1)) (and (moveAgain) (set Var "Direction" 1)) (and (if (is Occupied (trackSite Move from:(to) "TrackCW" steps:2)) (and (fromTo (from (trackSite Move from:(to) "TrackCW" steps:2)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:2))) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:3)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:4))) (and (fromTo (from (trackSite Move from:(to) "TrackCW" steps:4)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:4))) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:5)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:6))) (and (fromTo (from (trackSite Move from:(to) "TrackCW" steps:6)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:6))) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:7)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:8))) (fromTo (from (trackSite Move from:(to) "TrackCW" steps:8)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:8)))))))))) (set Var "Direction" 0))))))) (if (or (<= (var "Direction") 0) (= (var "Direction") 2)) (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (sow "TrackCCW" apply:(if (is Occupied (trackSite Move from:(to) "TrackCCW" steps:1)) (and (moveAgain) (set Var "Direction" 2)) (and (if (is Occupied (trackSite Move from:(to) "TrackCCW" steps:2)) (and (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:2)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:2))) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:3)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:4))) (and (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:4)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:4))) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:5)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:6))) (and (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:6)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:6))) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:7)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:8))) (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:8)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:8)))))))))) (set Var "Direction" 0))))))) (then (if (all Sites (union (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2"))) if:(is Empty (site))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (if (is Occupied (mapEntry P1)) (fromTo (from (mapEntry P1)) (to (handSite P1)) count:(count at:(mapEntry P1)))) (forEach Site (sites P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (if (is Occupied (mapEntry P2)) (fromTo (from (mapEntry P2)) (to (handSite P2)) count:(count at:(mapEntry P2)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 9 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 9 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (is Empty (mapEntry Mover)) (move (from (handSite Mover)) (to (mapEntry Mover)) count:5) (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To)))))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x4 board with two stores on either end, the store on a player's right belonging to them. Four counters per hole, five in each store. Players sow in the direction of their choosing from one of the holes in their row, not from the stores, on each turn, sowing also into the stores. If the next hole has counters, these are picked up and sowing continues with these counters. When this next hole is empty, the counters in the next hole after that are captured and the turn ends. If there are a series of alternating empty holes and holes with counters, the counters in these holes are captured until two empty or full holes are reached. When the point of the game is reached that play cannot continue, the players claim the counters in their holes, and a new game begins. The players refill their holes, beginning with their store, which receives five counters, and four in each other. Holes are only filled with exactly four counters, any extra are set aside. If a player cannot fill any of their holes with counters, these holes are eliminated from play. Play continues in this way until one player captures all of the counters or the other player cannot fill any holes.
###Ludii
(game "Bay Khom" (players 2) (equipment {(mancalaBoard 2 4 {(track "TrackCW" "0,5,E,9,4,W" loop:True) (track "TrackCCW" "0,1,E,9,8,W" loop:True)}) (piece "Seed" Shared) (map {(pair P1 LastSite) (pair P2 FirstSite)}) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start {(set Count 4 to:(union (sites P1) (sites P2))) (set Count 5 at:(mapEntry 1)) (set Count 5 at:(mapEntry 2)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or (if (or (<= (var "Direction") 0) (= (var "Direction") 1)) (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (sow "TrackCW" apply:(if (is Occupied (trackSite Move from:(to) "TrackCW" steps:1)) (and (moveAgain) (set Var "Direction" 1)) (and (if (is Occupied (trackSite Move from:(to) "TrackCW" steps:2)) (and (fromTo (from (trackSite Move from:(to) "TrackCW" steps:2)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:2))) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:3)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:4))) (and (fromTo (from (trackSite Move from:(to) "TrackCW" steps:4)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:4))) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:5)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:6))) (and (fromTo (from (trackSite Move from:(to) "TrackCW" steps:6)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:6))) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:7)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:8))) (fromTo (from (trackSite Move from:(to) "TrackCW" steps:8)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:8)))))))))) (set Var "Direction" 0))))))) (if (or (<= (var "Direction") 0) (= (var "Direction") 2)) (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (sow "TrackCCW" apply:(if (is Occupied (trackSite Move from:(to) "TrackCCW" steps:1)) (and (moveAgain) (set Var "Direction" 2)) (and (if (is Occupied (trackSite Move from:(to) "TrackCCW" steps:2)) (and (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:2)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:2))) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:3)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:4))) (and (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:4)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:4))) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:5)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:6))) (and (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:6)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:6))) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:7)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:8))) (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:8)) (to (mapEntry Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:8)))))))))) (set Var "Direction" 0))))))) (then (if (all Sites (union (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2"))) if:(is Empty (site))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (if (is Occupied (mapEntry P1)) (fromTo (from (mapEntry P1)) (to (handSite P1)) count:(count at:(mapEntry P1)))) (forEach Site (sites P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (if (is Occupied (mapEntry P2)) (fromTo (from (mapEntry P2)) (to (handSite P2)) count:(count at:(mapEntry P2)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 9 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 9 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (is Empty (mapEntry Mover)) (move (from (handSite Mover)) (to (mapEntry Mover)) count:5) (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To)))))))) (nextPhase (all Passed) "Sowing"))})) |
2x4 board. Six counters per hole. Sowing occurs in a clockwise direction from the left half of a player's row, and anti-clockwise when played from the player's right half of the row. The first seed of sowing is placed in the hole from which the sowing began. When the final counter of a sowing falls into an occupied hole, and it now contains an even number of counters, these are captured, provided the contents of that hole have already been moved. Should the following hole also contain an even number of counters, these are also captured, as well as the next one, until there is a hole with an odd number of counters. If a player cannot move, they must pass until the opponent plays in such a way that they may play. If neither player is able to move, they both capture the counters in their rows. Players then count their counters by placing them six per hole. The player who has more counters than necessary to fill their holes places them aside for use in successive rounds. The player who is unable to fill a hole with six counters leaves it empty, also placing the extra counters aside for later use. This hole is not to be sown into. The player chooses which hole to leave empty. Subsequent rounds continue until one player cannot fill a hole with six counters. The board has 4 columns. | (game "Bechi" (players 2) (equipment {(mancalaBoard 2 4 store:None {(track "TrackCW" "3,W,N,E" loop:True) (track "TrackCCW" "0,E,N,W" loop:True)}) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (regions "LeftSide" P1 (intersection (expand (sites Left) steps:1) (sites Bottom))) (regions "LeftSide" P2 (intersection (expand (sites Right) steps:1) (sites Top))) (regions "RightSide" P1 (intersection (expand (sites Right) steps:1) (sites Bottom))) (regions "RightSide" P2 (intersection (expand (sites Left) steps:1) (sites Top))) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 6 to:(sites Track))) phases:{(phase "Sowing" (play (if (can Move (or {(move Select (from (sites Mover "LeftSide") if:(> (count at:(from)) 1)) (then (and (remember Value "HolesSowed" (last To)) (sow "TrackCW" apply:(if (and (is In (to) (values Remembered "HolesSowed")) (is Even (count at:(to)))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)) (then (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:1))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:1))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:2))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:2))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:3))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:3)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:3))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:4))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:4)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:4))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:5))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:5)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:5))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:6))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:6)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:6))))))))))))))))) origin:True)))) (move Select (from (sites Mover "RightSide") if:(> (count at:(from)) 1)) (then (and (remember Value "HolesSowed" (last To)) (sow "TrackCCW" apply:(if (and (is In (to) (values Remembered "HolesSowed")) (is Even (count at:(to)))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)) (then (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:1))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:1))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:2))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:2))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:3))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:3)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:3))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:4))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:4)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:4))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:5))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:5)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:5))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:6))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:6)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:6))))))))))))))))) origin:True))))})) (or {(move Select (from (sites Mover "LeftSide") if:(> (count at:(from)) 1)) (then (and (remember Value "HolesSowed" (last To)) (sow "TrackCW" apply:(if (and (is In (to) (values Remembered "HolesSowed")) (is Even (count at:(to)))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)) (then (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:1))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:1))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:2))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:2))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:3))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:3)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:3))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:4))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:4)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:4))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:5))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:5)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:5))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:6))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:6)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:6))))))))))))))))) origin:True)))) (move Select (from (sites Mover "RightSide") if:(> (count at:(from)) 1)) (then (and (remember Value "HolesSowed" (last To)) (sow "TrackCCW" apply:(if (and (is In (to) (values Remembered "HolesSowed")) (is Even (count at:(to)))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)) (then (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:1))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:1))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:2))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:2))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:3))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:3)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:3))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:4))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:4)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:4))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:5))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:5)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:5))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:6))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:6)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:6))))))))))))))))) origin:True))))}) (move Pass (then (if (all Passed) (and {(forEach Site (sites P1 "Home") (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites P2 "Home") (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forget Value "HolesSowed" All)})))))) (end (if (all Passed) {(if (> 6 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 6 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Passed) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 6 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (intersection (sites Empty) (sites Mover "Home"))) count:6))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x4 board. Six counters per hole. Sowing occurs in a clockwise direction from the left half of a player's row, and anti-clockwise when played from the player's right half of the row. The first seed of sowing is placed in the hole from which the sowing began. When the final counter of a sowing falls into an occupied hole, and it now contains an even number of counters, these are captured, provided the contents of that hole have already been moved. Should the following hole also contain an even number of counters, these are also captured, as well as the next one, until there is a hole with an odd number of counters. If a player cannot move, they must pass until the opponent plays in such a way that they may play. If neither player is able to move, they both capture the counters in their rows. Players then count their counters by placing them six per hole. The player who has more counters than necessary to fill their holes places them aside for use in successive rounds. The player who is unable to fill a hole with six counters leaves it empty, also placing the extra counters aside for later use. This hole is not to be sown into. The player chooses which hole to leave empty. Subsequent rounds continue until one player cannot fill a hole with six counters. The board has 4 columns.
###Ludii
(game "Bechi" (players 2) (equipment {(mancalaBoard 2 4 store:None {(track "TrackCW" "3,W,N,E" loop:True) (track "TrackCCW" "0,E,N,W" loop:True)}) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (regions "LeftSide" P1 (intersection (expand (sites Left) steps:1) (sites Bottom))) (regions "LeftSide" P2 (intersection (expand (sites Right) steps:1) (sites Top))) (regions "RightSide" P1 (intersection (expand (sites Right) steps:1) (sites Bottom))) (regions "RightSide" P2 (intersection (expand (sites Left) steps:1) (sites Top))) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 6 to:(sites Track))) phases:{(phase "Sowing" (play (if (can Move (or {(move Select (from (sites Mover "LeftSide") if:(> (count at:(from)) 1)) (then (and (remember Value "HolesSowed" (last To)) (sow "TrackCW" apply:(if (and (is In (to) (values Remembered "HolesSowed")) (is Even (count at:(to)))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)) (then (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:1))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:1))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:2))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:2))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:3))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:3)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:3))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:4))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:4)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:4))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:5))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:5)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:5))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:6))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:6)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:6))))))))))))))))) origin:True)))) (move Select (from (sites Mover "RightSide") if:(> (count at:(from)) 1)) (then (and (remember Value "HolesSowed" (last To)) (sow "TrackCCW" apply:(if (and (is In (to) (values Remembered "HolesSowed")) (is Even (count at:(to)))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)) (then (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:1))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:1))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:2))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:2))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:3))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:3)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:3))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:4))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:4)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:4))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:5))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:5)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:5))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:6))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:6)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:6))))))))))))))))) origin:True))))})) (or {(move Select (from (sites Mover "LeftSide") if:(> (count at:(from)) 1)) (then (and (remember Value "HolesSowed" (last To)) (sow "TrackCW" apply:(if (and (is In (to) (values Remembered "HolesSowed")) (is Even (count at:(to)))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)) (then (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:1))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:1))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:2))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:2))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:3))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:3)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:3))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:4))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:4)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:4))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:5))) (and (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:5)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:5))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCW" steps:6))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:6)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCW" steps:6))))))))))))))))) origin:True)))) (move Select (from (sites Mover "RightSide") if:(> (count at:(from)) 1)) (then (and (remember Value "HolesSowed" (last To)) (sow "TrackCCW" apply:(if (and (is In (to) (values Remembered "HolesSowed")) (is Even (count at:(to)))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)) (then (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:1))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:1))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:2))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:2))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:3))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:3)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:3))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:4))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:4)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:4))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:5))) (and (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:5)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:5))) (if (is Even (count at:(trackSite Move from:(last From) "TrackCCW" steps:6))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:6)) (to (handSite Mover)) count:(count at:(trackSite Move from:(last From) "TrackCCW" steps:6))))))))))))))))) origin:True))))}) (move Pass (then (if (all Passed) (and {(forEach Site (sites P1 "Home") (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites P2 "Home") (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forget Value "HolesSowed" All)})))))) (end (if (all Passed) {(if (> 6 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 6 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Passed) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 6 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (intersection (sites Empty) (sites Mover "Home"))) count:6))) (nextPhase (all Passed) "Sowing"))})) |
Play begins with four counters in each hole. Players move by picking up all of the counters in any of the holes in their row and sowing them anti-clockwise. If the next hole after the one in which the final counter is dropped contains counters, these are picked up and sowing continues. If the next hole after the one in which the last counter was sown is empty, the counters in the hole after this one are taken and the turn is over. If that hole is empty, none are taken. When all of the holes in one row are empty, the player whose row still contains counters captures these counters. A new game begins. Each player fills as many of the holes in their row with four counters. The player which cannot fill all of their holes with four counters removes from play all of the holes that cannot be filled, and sets aside the extra counters. They play another round with the same rules as before, but without the eliminated hole(s). The game ends when one player must close all of the holes in their row, thus being unable to play. | (game "Bosh" (players 2) (equipment {(mancalaBoard 2 5 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) steps:1)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(> (count at:(from)) 0)) (then (sow apply:(if (and (= (count at:(trackSite Move from:(to) steps:1)) 0) (> (count at:(trackSite Move from:(to) steps:2)) 0)) (fromTo (from (trackSite Move from:(to) steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) steps:2))) (if (> (count at:(trackSite Move from:(to) steps:1)) 0) (moveAgain))) skipIf:(not (is In (to) (union (values Remembered "OwnedP1") (values Remembered "OwnedP2")))))))} (then (if (or (no Pieces All in:(sites P1)) (no Pieces All in:(sites P2))) (and (forEach Site (sites P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))))))) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (intersection (sites Empty) (sites Mover))) count:4) (move Pass (then (forEach Site (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2"))) (if (is Empty (site)) (if (is Mover P1) (forget Value "OwnedP1" (site)) (forget Value "OwnedP2" (site))))))))) (end (if (all Passed) {(if (if (= 1 P1) (= 0 (size Array (values Remembered "OwnedP1"))) (= 0 (size Array (values Remembered "OwnedP2")))) (result P2 Win)) (if (if (= 2 P1) (= 0 (size Array (values Remembered "OwnedP1"))) (= 0 (size Array (values Remembered "OwnedP2")))) (result P1 Win))})) (nextPhase (all Passed) "Sowing"))})) | ###Description
Play begins with four counters in each hole. Players move by picking up all of the counters in any of the holes in their row and sowing them anti-clockwise. If the next hole after the one in which the final counter is dropped contains counters, these are picked up and sowing continues. If the next hole after the one in which the last counter was sown is empty, the counters in the hole after this one are taken and the turn is over. If that hole is empty, none are taken. When all of the holes in one row are empty, the player whose row still contains counters captures these counters. A new game begins. Each player fills as many of the holes in their row with four counters. The player which cannot fill all of their holes with four counters removes from play all of the holes that cannot be filled, and sets aside the extra counters. They play another round with the same rules as before, but without the eliminated hole(s). The game ends when one player must close all of the holes in their row, thus being unable to play.
###Ludii
(game "Bosh" (players 2) (equipment {(mancalaBoard 2 5 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) steps:1)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(> (count at:(from)) 0)) (then (sow apply:(if (and (= (count at:(trackSite Move from:(to) steps:1)) 0) (> (count at:(trackSite Move from:(to) steps:2)) 0)) (fromTo (from (trackSite Move from:(to) steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) steps:2))) (if (> (count at:(trackSite Move from:(to) steps:1)) 0) (moveAgain))) skipIf:(not (is In (to) (union (values Remembered "OwnedP1") (values Remembered "OwnedP2")))))))} (then (if (or (no Pieces All in:(sites P1)) (no Pieces All in:(sites P2))) (and (forEach Site (sites P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))))))) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (intersection (sites Empty) (sites Mover))) count:4) (move Pass (then (forEach Site (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2"))) (if (is Empty (site)) (if (is Mover P1) (forget Value "OwnedP1" (site)) (forget Value "OwnedP2" (site))))))))) (end (if (all Passed) {(if (if (= 1 P1) (= 0 (size Array (values Remembered "OwnedP1"))) (= 0 (size Array (values Remembered "OwnedP2")))) (result P2 Win)) (if (if (= 2 P1) (= 0 (size Array (values Remembered "OwnedP1"))) (= 0 (size Array (values Remembered "OwnedP2")))) (result P1 Win))})) (nextPhase (all Passed) "Sowing"))})) |
2x4 board, rendered as holes in the sand. Six counters per hole. A player picks up all of the counters in one of the holes in their row and sows them in an anti-clockwise direction. When the final counter lands in an empty hole, the contents of the following hole are picked up and the sowing continues. When the final counter lands in a hole in the opponent's row causing it to contain six counters, these counters are captured. Play continues until one player has no counters in their holes, and the opponent wins. | (game "Boukerourou" (players 2) (equipment {(mancalaBoard 2 4 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 6 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) "Track" steps:1)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (and (= 1 (count at:(to))) (is Occupied (trackSite Move from:(to) "Track" steps:1))) (moveAgain) (if (and (is In (to) (sites Next)) (= 6 (count at:(to)))) (remove (to)))))))) (end (forEach Player if:(all Sites (sites Player) if:(= 0 (count at:(site)))) (result Player Loss))))) | ###Description
2x4 board, rendered as holes in the sand. Six counters per hole. A player picks up all of the counters in one of the holes in their row and sows them in an anti-clockwise direction. When the final counter lands in an empty hole, the contents of the following hole are picked up and the sowing continues. When the final counter lands in a hole in the opponent's row causing it to contain six counters, these counters are captured. Play continues until one player has no counters in their holes, and the opponent wins.
###Ludii
(game "Boukerourou" (players 2) (equipment {(mancalaBoard 2 4 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 6 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) "Track" steps:1)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (and (= 1 (count at:(to))) (is Occupied (trackSite Move from:(to) "Track" steps:1))) (moveAgain) (if (and (is In (to) (sites Next)) (= 6 (count at:(to)))) (remove (to)))))))) (end (forEach Player if:(all Sites (sites Player) if:(= 0 (count at:(site)))) (result Player Loss))))) |
2x4 board. Six counters in each hole. At the beginning of the game, each player chooses one hole to be their sowing hole, from which each move on their turn must begin. The players agree on a direction of play, which is maintained throughout the game. Players alternate turns sowing from their sowing hole. The players may choose to sow one-by-one, two-by-two, three-by-three, four-by-four, and so forth, into the following holes. When the final counter lands in a hole causing it to contain two, four, six, or eight counters, the contents of that hole are captured. If the preceding hole also contains two, four, six, or eight counters, these are also captured, proceeding until there is a no longer a hole with two, four, six, or eight counters. If at the end of a turn a player sowed into the opponent's row and any of the opponent's holes contain two, four, six, or eight counters, providing the player sowed into them, the opponent captures these counters. In a players own row, if either player sows into a hole with an odd number of counters, making it an even number of counters, the player who owns that row captures the counters. If a player's sowing hole is empty at the beginning of their turn, they pass. Play continues until all of the counters are captured, or there is only one left on the board. The single counter is captured by the player in whose row it is located. A new round begins. Players fill up as many holes as they can with six counters. If a player cannot, they fill as many as they can with six counters, and place the remainder in a hole, either between two with six counters or after them, and erases any empty holes. Play continues as before. When one player has erased all of their holes, the opponent wins. The game is played counter clockwise. | (game "Buqruru" (players 2) (equipment {(mancalaBoard 2 4 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(set Count 6 to:(sites Track)) (set RememberValue "Playable" (sites Board))}) phases:{(phase "SelectingHole" (play (move Select (from (sites Mover) if:(is In (from) (sites (values Remembered "Playable")))) (then (set Value Mover (last To))))) (nextPhase Mover "Sowing")) (phase "Sowing" (play (if (is Occupied (value Player Mover)) (or {(move Select (from (value Player Mover) if:(is In (from) (sites (values Remembered "Playable")))) (then (sow numPerHole:1 sowEffect:(if (and (is In (to) (sites Next)) (or {(= 1 (count at:(to))) (= 3 (count at:(to))) (= 5 (count at:(to))) (= 7 (count at:(to)))})) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) apply:(if (or {(= 2 (count at:(to))) (= 4 (count at:(to))) (= 6 (count at:(to))) (= 8 (count at:(to)))}) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable")))) backtracking:True))) (if (= 0 (% (count at:(value Player Mover)) 2)) (move Select (from (value Player Mover)) (then (sow numPerHole:2 sowEffect:(if (and (is In (to) (sites Next)) (or {(= 0 (count at:(to))) (= 2 (count at:(to))) (= 4 (count at:(to))) (= 6 (count at:(to)))})) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) apply:(if (or {(= 2 (count at:(to))) (= 4 (count at:(to))) (= 6 (count at:(to))) (= 8 (count at:(to)))}) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable")))) backtracking:True)))) (if (= 0 (% (count at:(value Player Mover)) 3)) (move Select (from (value Player Mover)) (then (sow numPerHole:3 sowEffect:(if (and (is In (to) (sites Next)) (or {(= 1 (count at:(to))) (= 3 (count at:(to))) (= 5 (count at:(to)))})) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) apply:(if (or {(= 2 (count at:(to))) (= 4 (count at:(to))) (= 6 (count at:(to))) (= 8 (count at:(to)))}) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable")))) backtracking:True)))) (if (= 0 (% (count at:(value Player Mover)) 4)) (move Select (from (value Player Mover)) (then (sow numPerHole:4 sowEffect:(if (and (is In (to) (sites Next)) (or {(= 0 (count at:(to))) (= 2 (count at:(to))) (= 4 (count at:(to)))})) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) apply:(if (or {(= 2 (count at:(to))) (= 4 (count at:(to))) (= 6 (count at:(to))) (= 8 (count at:(to)))}) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable")))) backtracking:True))))}) (then (if (> 2 (count in:(union (sites Top) (sites Bottom)))) (and {(forEach Site (sites P1) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forget Value "Playable" All)}))))) (end {(if (and (= 0 (count at:(value Player P1))) (= 0 (count at:(value Player P2)))) (result Mover Draw)) (if (> 2 (count in:(union (sites Top) (sites Bottom)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})}) (nextPhase (> 2 (count in:(union (sites Top) (sites Bottom)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 6 (count at:(handSite Mover))) (move (from (handSite Mover)) (to (sites Mover)) count:6 (then (remember Value "Playable" (last To)))) (move (from (handSite Mover)) (to (sites Mover)) count:(count at:(handSite Mover)) (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "SelectingHole"))})) | ###Description
2x4 board. Six counters in each hole. At the beginning of the game, each player chooses one hole to be their sowing hole, from which each move on their turn must begin. The players agree on a direction of play, which is maintained throughout the game. Players alternate turns sowing from their sowing hole. The players may choose to sow one-by-one, two-by-two, three-by-three, four-by-four, and so forth, into the following holes. When the final counter lands in a hole causing it to contain two, four, six, or eight counters, the contents of that hole are captured. If the preceding hole also contains two, four, six, or eight counters, these are also captured, proceeding until there is a no longer a hole with two, four, six, or eight counters. If at the end of a turn a player sowed into the opponent's row and any of the opponent's holes contain two, four, six, or eight counters, providing the player sowed into them, the opponent captures these counters. In a players own row, if either player sows into a hole with an odd number of counters, making it an even number of counters, the player who owns that row captures the counters. If a player's sowing hole is empty at the beginning of their turn, they pass. Play continues until all of the counters are captured, or there is only one left on the board. The single counter is captured by the player in whose row it is located. A new round begins. Players fill up as many holes as they can with six counters. If a player cannot, they fill as many as they can with six counters, and place the remainder in a hole, either between two with six counters or after them, and erases any empty holes. Play continues as before. When one player has erased all of their holes, the opponent wins. The game is played counter clockwise.
###Ludii
(game "Buqruru" (players 2) (equipment {(mancalaBoard 2 4 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(set Count 6 to:(sites Track)) (set RememberValue "Playable" (sites Board))}) phases:{(phase "SelectingHole" (play (move Select (from (sites Mover) if:(is In (from) (sites (values Remembered "Playable")))) (then (set Value Mover (last To))))) (nextPhase Mover "Sowing")) (phase "Sowing" (play (if (is Occupied (value Player Mover)) (or {(move Select (from (value Player Mover) if:(is In (from) (sites (values Remembered "Playable")))) (then (sow numPerHole:1 sowEffect:(if (and (is In (to) (sites Next)) (or {(= 1 (count at:(to))) (= 3 (count at:(to))) (= 5 (count at:(to))) (= 7 (count at:(to)))})) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) apply:(if (or {(= 2 (count at:(to))) (= 4 (count at:(to))) (= 6 (count at:(to))) (= 8 (count at:(to)))}) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable")))) backtracking:True))) (if (= 0 (% (count at:(value Player Mover)) 2)) (move Select (from (value Player Mover)) (then (sow numPerHole:2 sowEffect:(if (and (is In (to) (sites Next)) (or {(= 0 (count at:(to))) (= 2 (count at:(to))) (= 4 (count at:(to))) (= 6 (count at:(to)))})) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) apply:(if (or {(= 2 (count at:(to))) (= 4 (count at:(to))) (= 6 (count at:(to))) (= 8 (count at:(to)))}) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable")))) backtracking:True)))) (if (= 0 (% (count at:(value Player Mover)) 3)) (move Select (from (value Player Mover)) (then (sow numPerHole:3 sowEffect:(if (and (is In (to) (sites Next)) (or {(= 1 (count at:(to))) (= 3 (count at:(to))) (= 5 (count at:(to)))})) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) apply:(if (or {(= 2 (count at:(to))) (= 4 (count at:(to))) (= 6 (count at:(to))) (= 8 (count at:(to)))}) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable")))) backtracking:True)))) (if (= 0 (% (count at:(value Player Mover)) 4)) (move Select (from (value Player Mover)) (then (sow numPerHole:4 sowEffect:(if (and (is In (to) (sites Next)) (or {(= 0 (count at:(to))) (= 2 (count at:(to))) (= 4 (count at:(to)))})) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) apply:(if (or {(= 2 (count at:(to))) (= 4 (count at:(to))) (= 6 (count at:(to))) (= 8 (count at:(to)))}) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable")))) backtracking:True))))}) (then (if (> 2 (count in:(union (sites Top) (sites Bottom)))) (and {(forEach Site (sites P1) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forget Value "Playable" All)}))))) (end {(if (and (= 0 (count at:(value Player P1))) (= 0 (count at:(value Player P2)))) (result Mover Draw)) (if (> 2 (count in:(union (sites Top) (sites Bottom)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})}) (nextPhase (> 2 (count in:(union (sites Top) (sites Bottom)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 6 (count at:(handSite Mover))) (move (from (handSite Mover)) (to (sites Mover)) count:6 (then (remember Value "Playable" (last To)))) (move (from (handSite Mover)) (to (sites Mover)) count:(count at:(handSite Mover)) (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "SelectingHole"))})) |
2x7 board with two stores. Seven counters in each hole. Players move from one of the holes in their row, sowing in a clockwise direction, and including the player's store, which is to the left, but not the opponent's store. If the final counter of a sowing lands in an occupied hole (not a store), sowing continues. If it lands into an empty hole, the turn is over. If the empty hole is in the player's own row, the contents of the hole opposite in the opponent's row are captured and placed in the store. The person who captures the most counters wins. | (game "Chongka'" (players 2) (equipment {(mancalaBoard 2 7 {(track "Track1" "7,W,WNW,ENE,E" loop:True P1) (track "Track2" "7,W,N,E,ESE" loop:True P2)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start (set Count 7 to:(union (sites P1) (sites P2)))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow "Track" owner:(mover) apply:(if (and {(> (count at:(to)) 1) (is In (to) (union (sites P1) (sites P2)))}) (moveAgain) (if (and (is In (to) (sites Mover)) (> (count at:(if (is Mover P1) (+ (to) 7) (- (to) 7))) 0)) (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (mapEntry Mover)) count:(count at:(if (is Mover P1) (+ (to) 7) (- (to) 7)))))))))) (end (if (and (no Moves Mover) (no Moves Next)) (byScore {(score P1 (count at:(mapEntry P1))) (score P2 (count at:(mapEntry P2)))}))))) | ###Description
2x7 board with two stores. Seven counters in each hole. Players move from one of the holes in their row, sowing in a clockwise direction, and including the player's store, which is to the left, but not the opponent's store. If the final counter of a sowing lands in an occupied hole (not a store), sowing continues. If it lands into an empty hole, the turn is over. If the empty hole is in the player's own row, the contents of the hole opposite in the opponent's row are captured and placed in the store. The person who captures the most counters wins.
###Ludii
(game "Chongka'" (players 2) (equipment {(mancalaBoard 2 7 {(track "Track1" "7,W,WNW,ENE,E" loop:True P1) (track "Track2" "7,W,N,E,ESE" loop:True P2)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start (set Count 7 to:(union (sites P1) (sites P2)))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow "Track" owner:(mover) apply:(if (and {(> (count at:(to)) 1) (is In (to) (union (sites P1) (sites P2)))}) (moveAgain) (if (and (is In (to) (sites Mover)) (> (count at:(if (is Mover P1) (+ (to) 7) (- (to) 7))) 0)) (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (mapEntry Mover)) count:(count at:(if (is Mover P1) (+ (to) 7) (- (to) 7)))))))))) (end (if (and (no Moves Mover) (no Moves Next)) (byScore {(score P1 (count at:(mapEntry P1))) (score P2 (count at:(mapEntry P2)))}))))) |
2x7 board, with two stores. Seven counters per hole. The first player may choose the direction of sowing, which must be maintained throughout the game. Sowing includes the player's store, which is the store following the last hole in the player's row, according to the direction of sowing. When the final counter of a sowing falls into an occupied hole, the counters in that hole are picked up and sowing continues. When the final counter of a sowing falls into an empty hole, that counter is captured along with any counters in the hole in the row opposite it. When the final counter falls into the player's store, the turn ends. The player who first captures half of the counters wins. Sowing occurs in CCW. | (game "Chonka" (players 2) (equipment {(mancalaBoard 2 7 {(track "Track1" "1,E,ENE,WNW,W" loop:True P1) (track "Track2" "1,E,N,W,WSW" loop:True P2)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 LastSite) (pair P2 FirstSite)})}) (rules (start (set Count 7 to:(union (sites P1) (sites P2)))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (!= (to) (mapEntry Mover)) (if (> (count at:(to)) 1) (moveAgain) (and (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7)))) (fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to)))))))))) (end (if (<= (/ (* 7 (- (count Sites in:(sites Board)) 2)) 2) (count at:(mapEntry Mover))) (result Mover Win))))) | ###Description
2x7 board, with two stores. Seven counters per hole. The first player may choose the direction of sowing, which must be maintained throughout the game. Sowing includes the player's store, which is the store following the last hole in the player's row, according to the direction of sowing. When the final counter of a sowing falls into an occupied hole, the counters in that hole are picked up and sowing continues. When the final counter of a sowing falls into an empty hole, that counter is captured along with any counters in the hole in the row opposite it. When the final counter falls into the player's store, the turn ends. The player who first captures half of the counters wins. Sowing occurs in CCW.
###Ludii
(game "Chonka" (players 2) (equipment {(mancalaBoard 2 7 {(track "Track1" "1,E,ENE,WNW,W" loop:True P1) (track "Track2" "1,E,N,W,WSW" loop:True P2)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 LastSite) (pair P2 FirstSite)})}) (rules (start (set Count 7 to:(union (sites P1) (sites P2)))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (!= (to) (mapEntry Mover)) (if (> (count at:(to)) 1) (moveAgain) (and (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7)))) (fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to)))))))))) (end (if (<= (/ (* 7 (- (count Sites in:(sites Board)) 2)) 2) (count at:(mapEntry Mover))) (result Mover Win))))) |
2x7 board, with two stores. Seven counters in each hole. Players sow from any hole on their side of the board, in a clockwise direction, and sow into the store on their left, but not the one on the right. When the final counter of a sowing lands in an occupied hole that is not the store, the player picks up these counters and continues sowing. When then final counter lands in an empty hole, the turn ends. When the final counter lands in the store, the turn ends. Play continues until all of the counters are in the stores, and the player with the most counters in their store wins. | (game "Chungcajon" (players 2) (equipment {(mancalaBoard 2 7 {(track "Track1" "7,W,WNW,ENE,E" loop:True P1) (track "Track2" "8,E,ESE,WSW,W" loop:True P2)}) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 7 to:(union (sites P1) (sites P2)))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow "Track" owner:(mover) if:(and (> (count at:(to)) 1) (!= (to) (mapEntry Mover))) apply:(moveAgain))))) (end (if (all Sites (union (sites P1) (sites P2)) if:(= 0 (count at:(site)))) (byScore {(score P1 (count at:(mapEntry P1))) (score P2 (count at:(mapEntry P2)))}))))) | ###Description
2x7 board, with two stores. Seven counters in each hole. Players sow from any hole on their side of the board, in a clockwise direction, and sow into the store on their left, but not the one on the right. When the final counter of a sowing lands in an occupied hole that is not the store, the player picks up these counters and continues sowing. When then final counter lands in an empty hole, the turn ends. When the final counter lands in the store, the turn ends. Play continues until all of the counters are in the stores, and the player with the most counters in their store wins.
###Ludii
(game "Chungcajon" (players 2) (equipment {(mancalaBoard 2 7 {(track "Track1" "7,W,WNW,ENE,E" loop:True P1) (track "Track2" "8,E,ESE,WSW,W" loop:True P2)}) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 7 to:(union (sites P1) (sites P2)))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow "Track" owner:(mover) if:(and (> (count at:(to)) 1) (!= (to) (mapEntry Mover))) apply:(moveAgain))))) (end (if (all Sites (union (sites P1) (sites P2)) if:(= 0 (count at:(site)))) (byScore {(score P1 (count at:(mapEntry P1))) (score P2 (count at:(mapEntry P2)))}))))) |
Two rows of ten holes Four counters in each hole First play must be from the rightmost hole. The player has to open the game with one of the four rightmost holes. | (game "Dabuda" (players 2) (equipment {(mancalaBoard 2 10 store:None (track "Track" "0,E,N,W" loop:True)) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (regions "RightMost" P1 (sites {6 7 8 9})) (regions "RightMost" P2 (sites {10 11 12 13})) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Rightmost" (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover "RightMost")) if:(> (count at:(from)) 0)) (then (sow apply:(if (and {(is In (to) (sites Mover "Home")) (= (count at:(to)) 1) (> (count at:(if (is Mover P1) (+ (to) 10) (- (to) 10))) 0)}) (and (fromTo (from (if (is Mover P1) (+ (to) 10) (- (to) 10))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 10) (- (to) 10)))) (fromTo (from (to)) (to (handSite Mover)) count:1)) (if (> (count at:(to)) 1) (moveAgain))))))) (nextPhase (= (count Turns) 2) "HomePhase")) (phase "HomePhase" (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover "Home")) if:(> (count at:(from)) 0)) (then (sow apply:(if (and {(is In (to) (sites Mover "Home")) (= (count at:(to)) 1) (> (count at:(if (is Mover P1) (+ (to) 10) (- (to) 10))) 0)}) (and (fromTo (from (if (is Mover P1) (+ (to) 10) (- (to) 10))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 10) (- (to) 10)))) (fromTo (from (to)) (to (handSite Mover)) count:1)) (if (> (count at:(to)) 1) (moveAgain))))))))} (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1 "Home")))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2 "Home"))))}))))) | ###Description
Two rows of ten holes Four counters in each hole First play must be from the rightmost hole. The player has to open the game with one of the four rightmost holes.
###Ludii
(game "Dabuda" (players 2) (equipment {(mancalaBoard 2 10 store:None (track "Track" "0,E,N,W" loop:True)) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (regions "RightMost" P1 (sites {6 7 8 9})) (regions "RightMost" P2 (sites {10 11 12 13})) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Rightmost" (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover "RightMost")) if:(> (count at:(from)) 0)) (then (sow apply:(if (and {(is In (to) (sites Mover "Home")) (= (count at:(to)) 1) (> (count at:(if (is Mover P1) (+ (to) 10) (- (to) 10))) 0)}) (and (fromTo (from (if (is Mover P1) (+ (to) 10) (- (to) 10))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 10) (- (to) 10)))) (fromTo (from (to)) (to (handSite Mover)) count:1)) (if (> (count at:(to)) 1) (moveAgain))))))) (nextPhase (= (count Turns) 2) "HomePhase")) (phase "HomePhase" (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover "Home")) if:(> (count at:(from)) 0)) (then (sow apply:(if (and {(is In (to) (sites Mover "Home")) (= (count at:(to)) 1) (> (count at:(if (is Mover P1) (+ (to) 10) (- (to) 10))) 0)}) (and (fromTo (from (if (is Mover P1) (+ (to) 10) (- (to) 10))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 10) (- (to) 10)))) (fromTo (from (to)) (to (handSite Mover)) count:1)) (if (> (count at:(to)) 1) (moveAgain))))))))} (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1 "Home")))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2 "Home"))))}))))) |
2x7 board with two stores. Four counters in each hole. Sowing occurs in either a clockwise or anti-clockwise direction; the first player chooses the direction and all subsequent moves are made in that direction. Players sow beginning from holes their row. If the final counter falls into an empty hole, the contents of the opposite hole in the other row are captured. If the last counter falls into a hole with counters, these are picked up and sowing continues. Throughout the game, singletons cannot be moved if a player has a hole with multiple counters, and a singleton in the front hole cannot be moved if there are other singletons in the player's row. The round ends when one player's holes are empty. A second round begins with the winner of the first round placing four counters in each of their holes, leaving any surplus in the store. The loser of round one places four counters in as many consecutive holes on their side of the board as possible, and any remaining counters in the next hole. If this hole contains one, it is called puta, if two, naga, if three, wala. Holes with no counters are excluded from play for this round. If the loser has a puta hole, the opponent removes three counters from their hole opposite; if a naga, the opponent removes two from the opposite hole, if a wala, the opponent removes one. The removed counters go into their store. Puta and naga holes are marked with a piece of paper or straw in them. Empty holes are excluded from play in this round. The losing player begins the round, moving in the direction of the excluded holes, and played in the same way as the first round. The player with empty holes begins play in the direction of the empty hole. Counters cannot be sown or captured from puta or naga holes. Play continues as before, but when the final counter falls into a puta or naga hole, the contents of the opposite hole in the other row are captured. When one player has fewer than twelve counters at the beginning of a round, they may arrange them differently at the beginning. They may put one or two counters in one end hole and not more than four in the other end hole, and one or two counters in the intermediate holes, leaving some empty and, thus, excluded. The opponent then puts four counters in each of their holes. There are no puta, naga, or wala holes in this round. The player with more counters plays as before, but the one with less has captures that are determined by the number of counters placed in the first end hole. If there were two in the end hole, the player captures when dropping the final counter into a hole to make it three; or when it makes two if there was one counter in the first end hole. Otherwise, the player does not sow in holes with one or two counters. Play continues until one player cannot sow at the beginning of a round. | (game "Daramuti" (players 2) (equipment {(mancalaBoard 2 7 {(track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "7,W,N,E" loop:True)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "StartingMove" (play (or (move Select (from (sites Mover) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (and (sow "TrackCCW" apply:(if (= 1 (count at:(to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))))) (and (moveAgain) (set Var "Replay" (to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable"))))) (set Var "Direction" 1)))) (move Select (from (sites Mover) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (and (sow "TrackCW" apply:(if (= 1 (count at:(to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))))) (and (moveAgain) (set Var "Replay" (to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable"))))) (set Var "Direction" 2)))))) (nextPhase "Sowing")) (phase "Sowing" (play (if (= 1 (var "Direction")) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (not (is In (from) (sites (values Remembered "Blocked")))) (if (not (all Sites (forEach (sites Mover) if:(is In (site) (sites (values Remembered "Playable")))) if:(>= 1 (count at:(site))))) (< 1 (count at:(from))))})) (then (sow "TrackCCW" apply:(if (= 1 (count at:(to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))))) (and (moveAgain) (set Var "Replay" (to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable"))))))) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (not (is In (from) (sites (values Remembered "Blocked")))) (if (not (all Sites (forEach (sites Mover) if:(is In (site) (sites (values Remembered "Playable")))) if:(>= 1 (count at:(site))))) (< 1 (count at:(from))))})) (then (sow "TrackCW" apply:(if (= 1 (count at:(to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))))) (and (moveAgain) (set Var "Replay" (to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable"))))))) (then (if (no Moves Next) (and {(forEach Site (sites P1) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))) (forget Value "Playable" All) (forget Value "Blocked" All) (if (< (+ (count at:(mapEntry P1)) (count in:(sites P1))) (+ (count at:(mapEntry P2)) (count in:(sites P2)))) (and (set NextPlayer (player 2)) (set Var "Winner" 2)) (and (set NextPlayer (player 1)) (set Var "Winner" 1)))}))))) (end (if (no Moves Next) {(if (> 2 (count at:(mapEntry P1))) (result P2 Win)) (if (> 2 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (no Moves Next) "BetweenRounds")) (phase "BetweenRounds" (play (if (and (not (is Prev Mover)) (!= (mover) (var "Winner"))) (or (move (from (mapEntry Mover)) (to (if (is Mover P1) (intersection (sites Bottom) (expand (sites Right))) (intersection (sites Top) (expand (sites Left)))) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (if (> 4 (count at:(last To))) (and (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Next)) count:(- 4 (count at:(last To)))) (remember Value "Blocked" (last To)))) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending)) (set Var "Direction" 2)}))) (move (from (mapEntry Mover)) (to (if (is Mover P1) (intersection (sites Bottom) (expand (sites Left))) (intersection (sites Top) (expand (sites Right)))) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (if (> 4 (count at:(last To))) (and (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Next)) count:(- 4 (count at:(last To)))) (remember Value "Blocked" (last To)))) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending)) (set Var "Direction" 1)})))) (if (!= (mover) (var "Winner")) (move (from (mapEntry Mover)) (to (if (= (var "Direction") 1) (trackSite Move from:(last To) "TrackCCW" steps:1) (trackSite Move from:(last To) "TrackCW" steps:1)) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending))}))) (move (from (mapEntry Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (and (remember Value "Playable" (last To)) (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (moveAgain)))))))) (nextPhase (and (!= (var "Winner") (mover)) (= 0 (count at:(mapEntry Mover)))) "Sowing"))})) | ###Description
2x7 board with two stores. Four counters in each hole. Sowing occurs in either a clockwise or anti-clockwise direction; the first player chooses the direction and all subsequent moves are made in that direction. Players sow beginning from holes their row. If the final counter falls into an empty hole, the contents of the opposite hole in the other row are captured. If the last counter falls into a hole with counters, these are picked up and sowing continues. Throughout the game, singletons cannot be moved if a player has a hole with multiple counters, and a singleton in the front hole cannot be moved if there are other singletons in the player's row. The round ends when one player's holes are empty. A second round begins with the winner of the first round placing four counters in each of their holes, leaving any surplus in the store. The loser of round one places four counters in as many consecutive holes on their side of the board as possible, and any remaining counters in the next hole. If this hole contains one, it is called puta, if two, naga, if three, wala. Holes with no counters are excluded from play for this round. If the loser has a puta hole, the opponent removes three counters from their hole opposite; if a naga, the opponent removes two from the opposite hole, if a wala, the opponent removes one. The removed counters go into their store. Puta and naga holes are marked with a piece of paper or straw in them. Empty holes are excluded from play in this round. The losing player begins the round, moving in the direction of the excluded holes, and played in the same way as the first round. The player with empty holes begins play in the direction of the empty hole. Counters cannot be sown or captured from puta or naga holes. Play continues as before, but when the final counter falls into a puta or naga hole, the contents of the opposite hole in the other row are captured. When one player has fewer than twelve counters at the beginning of a round, they may arrange them differently at the beginning. They may put one or two counters in one end hole and not more than four in the other end hole, and one or two counters in the intermediate holes, leaving some empty and, thus, excluded. The opponent then puts four counters in each of their holes. There are no puta, naga, or wala holes in this round. The player with more counters plays as before, but the one with less has captures that are determined by the number of counters placed in the first end hole. If there were two in the end hole, the player captures when dropping the final counter into a hole to make it three; or when it makes two if there was one counter in the first end hole. Otherwise, the player does not sow in holes with one or two counters. Play continues until one player cannot sow at the beginning of a round.
###Ludii
(game "Daramuti" (players 2) (equipment {(mancalaBoard 2 7 {(track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "7,W,N,E" loop:True)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "StartingMove" (play (or (move Select (from (sites Mover) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (and (sow "TrackCCW" apply:(if (= 1 (count at:(to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))))) (and (moveAgain) (set Var "Replay" (to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable"))))) (set Var "Direction" 1)))) (move Select (from (sites Mover) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (and (sow "TrackCW" apply:(if (= 1 (count at:(to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))))) (and (moveAgain) (set Var "Replay" (to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable"))))) (set Var "Direction" 2)))))) (nextPhase "Sowing")) (phase "Sowing" (play (if (= 1 (var "Direction")) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (not (is In (from) (sites (values Remembered "Blocked")))) (if (not (all Sites (forEach (sites Mover) if:(is In (site) (sites (values Remembered "Playable")))) if:(>= 1 (count at:(site))))) (< 1 (count at:(from))))})) (then (sow "TrackCCW" apply:(if (= 1 (count at:(to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))))) (and (moveAgain) (set Var "Replay" (to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable"))))))) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (not (is In (from) (sites (values Remembered "Blocked")))) (if (not (all Sites (forEach (sites Mover) if:(is In (site) (sites (values Remembered "Playable")))) if:(>= 1 (count at:(site))))) (< 1 (count at:(from))))})) (then (sow "TrackCW" apply:(if (= 1 (count at:(to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))))) (and (moveAgain) (set Var "Replay" (to)))) skipIf:(not (is In (to) (sites (values Remembered "Playable"))))))) (then (if (no Moves Next) (and {(forEach Site (sites P1) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))) (forget Value "Playable" All) (forget Value "Blocked" All) (if (< (+ (count at:(mapEntry P1)) (count in:(sites P1))) (+ (count at:(mapEntry P2)) (count in:(sites P2)))) (and (set NextPlayer (player 2)) (set Var "Winner" 2)) (and (set NextPlayer (player 1)) (set Var "Winner" 1)))}))))) (end (if (no Moves Next) {(if (> 2 (count at:(mapEntry P1))) (result P2 Win)) (if (> 2 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (no Moves Next) "BetweenRounds")) (phase "BetweenRounds" (play (if (and (not (is Prev Mover)) (!= (mover) (var "Winner"))) (or (move (from (mapEntry Mover)) (to (if (is Mover P1) (intersection (sites Bottom) (expand (sites Right))) (intersection (sites Top) (expand (sites Left)))) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (if (> 4 (count at:(last To))) (and (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Next)) count:(- 4 (count at:(last To)))) (remember Value "Blocked" (last To)))) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending)) (set Var "Direction" 2)}))) (move (from (mapEntry Mover)) (to (if (is Mover P1) (intersection (sites Bottom) (expand (sites Left))) (intersection (sites Top) (expand (sites Right)))) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (if (> 4 (count at:(last To))) (and (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (mapEntry Next)) count:(- 4 (count at:(last To)))) (remember Value "Blocked" (last To)))) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending)) (set Var "Direction" 1)})))) (if (!= (mover) (var "Winner")) (move (from (mapEntry Mover)) (to (if (= (var "Direction") 1) (trackSite Move from:(last To) "TrackCCW" steps:1) (trackSite Move from:(last To) "TrackCW" steps:1)) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending))}))) (move (from (mapEntry Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (and (remember Value "Playable" (last To)) (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (moveAgain)))))))) (nextPhase (and (!= (var "Winner") (mover)) (= 0 (count at:(mapEntry Mover)))) "Sowing"))})) |
2x6 board with store holes at either end. The game begins with six counters in each hole. Each player owns one row of holes. At the beginning of the turn, a player picks up all of the counters from their side of the board and sows them, one each, into consecutive holes in a counterclockwise pattern. If the last counter lands in a hole that contains 2, 4, or 6 (after sowing), then the player captures the counters in that hole. If the player captures counters in a hole, then they may also capture counters in the previous hole, if it also has 2,4, or 6, continuing until reaching a hole without 2, 4, or 6. Play continues until one player cannot play on their turn, at which point the other player receives all of the remaining counters. The player with the most captured counters wins. | (game "Das Bohnenspiel" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 6 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow if:(is In (count at:(to)) (sites {2 4 6})) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) backtracking:True)))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
2x6 board with store holes at either end. The game begins with six counters in each hole. Each player owns one row of holes. At the beginning of the turn, a player picks up all of the counters from their side of the board and sows them, one each, into consecutive holes in a counterclockwise pattern. If the last counter lands in a hole that contains 2, 4, or 6 (after sowing), then the player captures the counters in that hole. If the player captures counters in a hole, then they may also capture counters in the previous hole, if it also has 2,4, or 6, continuing until reaching a hole without 2, 4, or 6. Play continues until one player cannot play on their turn, at which point the other player receives all of the remaining counters. The player with the most captured counters wins.
###Ludii
(game "Das Bohnenspiel" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 6 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow if:(is In (count at:(to)) (sites {2 4 6})) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) backtracking:True)))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
Two rows of six holes encircling a larger hole in the center. Two counters in each hole, except the center hole. Players move by removing the counters from one of the holes in their row and sowing them in an anti-clockwise direction. If the final counter of the sowing falls into an occupied hole, these counters are picked up and sowing continues. When the final counter falls into an empty hole, the turn ends. If the final counter falls into a hole already containing two others, the player takes these counters and covers the hole. The three counters are sown beginning with the following hole. When sowing, if a player reaches a covered hole in their row, they skip it and continue sowing with the next available hole. If the player reaches a covered hole in the opponent's row, the counter that would fall into it is instead deposited into the central hole. If this is the final counter, the turn ends. It is possible to sow a single counter. The player who can no longer sow from their row loses. | (game "Deka" (players 2) (equipment {(board (merge {(rectangle 1 5) (rectangle 3 1) (shift 0 2 (rectangle 1 5)) (shift 4 0 (rectangle 3 1)) (shift 2 1 (square 1))}) (track "Track" "0,E,N,W,S1" loop:True) use:Vertex) (regions P1 (sites {0 1 2 3 4 11})) (regions P2 (sites {5 6 7 8 9 10})) (piece "Seed" Shared)}) (rules (start (set Count 2 to:(difference (sites Board) 12))) (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(is Occupied (from))) (then (sow apply:(if (not (and (is In (to) (sites Next)) (= (next) (state at:(to))))) (if (= 3 (count at:(to))) (and {(fromTo (from (to)) (to (trackSite Move from:(to) steps:1)) count:3) (sow (trackSite Move from:(to) steps:1) count:3 skipIf:(and (is In (to) (sites Mover)) (= 1 (state at:(to))))) (set State at:(to) 1)}) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to)))))) skipIf:(and (is In (to) (sites Mover)) (= (mover) (state at:(to)))))))} (then (forEach Site (if (is Mover P1) (sites P2) (sites P1)) (if (= 1 (state at:(site))) (and (fromTo (from (site)) (to (centrePoint)) count:(count at:(site))) (set State at:(site) 1))))))) (end (forEach Player if:(no Moves Player) (result Player Loss))))) | ###Description
Two rows of six holes encircling a larger hole in the center. Two counters in each hole, except the center hole. Players move by removing the counters from one of the holes in their row and sowing them in an anti-clockwise direction. If the final counter of the sowing falls into an occupied hole, these counters are picked up and sowing continues. When the final counter falls into an empty hole, the turn ends. If the final counter falls into a hole already containing two others, the player takes these counters and covers the hole. The three counters are sown beginning with the following hole. When sowing, if a player reaches a covered hole in their row, they skip it and continue sowing with the next available hole. If the player reaches a covered hole in the opponent's row, the counter that would fall into it is instead deposited into the central hole. If this is the final counter, the turn ends. It is possible to sow a single counter. The player who can no longer sow from their row loses.
###Ludii
(game "Deka" (players 2) (equipment {(board (merge {(rectangle 1 5) (rectangle 3 1) (shift 0 2 (rectangle 1 5)) (shift 4 0 (rectangle 3 1)) (shift 2 1 (square 1))}) (track "Track" "0,E,N,W,S1" loop:True) use:Vertex) (regions P1 (sites {0 1 2 3 4 11})) (regions P2 (sites {5 6 7 8 9 10})) (piece "Seed" Shared)}) (rules (start (set Count 2 to:(difference (sites Board) 12))) (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(is Occupied (from))) (then (sow apply:(if (not (and (is In (to) (sites Next)) (= (next) (state at:(to))))) (if (= 3 (count at:(to))) (and {(fromTo (from (to)) (to (trackSite Move from:(to) steps:1)) count:3) (sow (trackSite Move from:(to) steps:1) count:3 skipIf:(and (is In (to) (sites Mover)) (= 1 (state at:(to))))) (set State at:(to) 1)}) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to)))))) skipIf:(and (is In (to) (sites Mover)) (= (mover) (state at:(to)))))))} (then (forEach Site (if (is Mover P1) (sites P2) (sites P1)) (if (= 1 (state at:(site))) (and (fromTo (from (site)) (to (centrePoint)) count:(count at:(site))) (set State at:(site) 1))))))) (end (forEach Player if:(no Moves Player) (result Player Loss))))) |
2x5 board. Five counters per hole. Sowing can happen in either direction. When the last counter falls into a hole, sowing continues if there are counters in the following holes; these are picked up and sowing continues from there. When the hole after the end of a sowing is empty, the counters in the next hole following it are captured. If a pattern of alternating empty and occupied holes continues after this, the counters in the occupied holes are captured, until there are two occupied or two empty holes in a row. The player who captures the most counters wins. | (game "Dongjintian" (players 2) (equipment {(mancalaBoard 2 5 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "4,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 5 to:(sites Track))) (play (or (if (or (>= 0 (var "Direction")) (= (var "Direction") 1)) (move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) "TrackCCW" steps:1)}) (sites Mover)) if:(is Occupied (from))) (then (sow "TrackCCW" apply:(if (is Occupied (trackSite Move from:(to) "TrackCCW" steps:1)) (and (moveAgain) (set Var "Direction" 1)) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:1)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:2))) (and (and (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:2))) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:3)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:4))) (and (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:4)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:4))) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:5)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:6))) (and (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:6)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:6))) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:7)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:8))) (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:8)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:8))))))))) (set Var "Direction" 0)))))))) (if (or (>= 0 (var "Direction")) (= (var "Direction") 2)) (move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) "TrackCW" steps:1)}) (sites Mover)) if:(is Occupied (from))) (then (sow "TrackCW" apply:(if (is Occupied (trackSite Move from:(to) "TrackCW" steps:1)) (and (moveAgain) (set Var "Direction" 2)) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:1)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:2))) (and (and (fromTo (from (trackSite Move from:(to) "TrackCW" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:2))) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:3)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:4))) (and (fromTo (from (trackSite Move from:(to) "TrackCW" steps:4)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:4))) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:5)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:6))) (and (fromTo (from (trackSite Move from:(to) "TrackCW" steps:6)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:6))) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:7)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:8))) (fromTo (from (trackSite Move from:(to) "TrackCW" steps:8)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:8))))))))) (set Var "Direction" 0)))))))))) (end (if (<= (count Pieces All in:(sites Board)) 1) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) | ###Description
2x5 board. Five counters per hole. Sowing can happen in either direction. When the last counter falls into a hole, sowing continues if there are counters in the following holes; these are picked up and sowing continues from there. When the hole after the end of a sowing is empty, the counters in the next hole following it are captured. If a pattern of alternating empty and occupied holes continues after this, the counters in the occupied holes are captured, until there are two occupied or two empty holes in a row. The player who captures the most counters wins.
###Ludii
(game "Dongjintian" (players 2) (equipment {(mancalaBoard 2 5 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "4,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 5 to:(sites Track))) (play (or (if (or (>= 0 (var "Direction")) (= (var "Direction") 1)) (move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) "TrackCCW" steps:1)}) (sites Mover)) if:(is Occupied (from))) (then (sow "TrackCCW" apply:(if (is Occupied (trackSite Move from:(to) "TrackCCW" steps:1)) (and (moveAgain) (set Var "Direction" 1)) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:1)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:2))) (and (and (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:2))) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:3)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:4))) (and (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:4)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:4))) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:5)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:6))) (and (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:6)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:6))) (if (and (is Empty (trackSite Move from:(to) "TrackCCW" steps:7)) (is Occupied (trackSite Move from:(to) "TrackCCW" steps:8))) (fromTo (from (trackSite Move from:(to) "TrackCCW" steps:8)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCCW" steps:8))))))))) (set Var "Direction" 0)))))))) (if (or (>= 0 (var "Direction")) (= (var "Direction") 2)) (move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) "TrackCW" steps:1)}) (sites Mover)) if:(is Occupied (from))) (then (sow "TrackCW" apply:(if (is Occupied (trackSite Move from:(to) "TrackCW" steps:1)) (and (moveAgain) (set Var "Direction" 2)) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:1)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:2))) (and (and (fromTo (from (trackSite Move from:(to) "TrackCW" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:2))) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:3)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:4))) (and (fromTo (from (trackSite Move from:(to) "TrackCW" steps:4)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:4))) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:5)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:6))) (and (fromTo (from (trackSite Move from:(to) "TrackCW" steps:6)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:6))) (if (and (is Empty (trackSite Move from:(to) "TrackCW" steps:7)) (is Occupied (trackSite Move from:(to) "TrackCW" steps:8))) (fromTo (from (trackSite Move from:(to) "TrackCW" steps:8)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "TrackCW" steps:8))))))))) (set Var "Direction" 0)))))))))) (end (if (<= (count Pieces All in:(sites Board)) 1) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) |
2x6 board with two stores. Four counters in each hole. Sowing occurs in an anti-clockwise direction. When the final counter lands in an occupied hole the counters are picked up and sowing continues, unless the hole contained three counters, causing it to contain four, in which case the counters are captured. An unbroken sequence of holes with four counters in them behind the hole from which the first capture was made are also captured. In addition, any holes which were sown into during the course of the turn which now contain four counters are captured by the owner of the row. Play continues until there are only eight counters left. The first player to make a capture with these eight counters captures them all. The player with the most counters wins. | (game "Duene" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Playing" (play (move Select (from (if (is Prev Mover) (sites {(var "To")}) (sites Mover)) if:(< 0 (count at:(from)))) (then (do (and (set Var "From" (last From)) (sow apply:(and (set Var "To" (to)) (if (= (count at:(to)) 4) (fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) (if (> (count at:(to)) 1) (moveAgain)))) backtracking:(= (count at:(to)) 4))) next:(and {(pass) (forEach Site (forEach (sites Track from:(var "From") to:(var "To")) if:(and (is In (site) (sites P1)) (= 4 (count at:(site))))) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site)))) (forEach Site (forEach (sites Track from:(var "From") to:(var "To")) if:(and (is In (site) (sites P2)) (= 4 (count at:(site))))) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))}))))) (nextPhase (<= (count in:(sites Track)) 8) "EndGame")) (phase "EndGame" (play (move Select (from (if (is Prev Mover) (sites {(var "To")}) (sites Mover)) if:(< 0 (count at:(from)))) (then (sow apply:(if (= (count at:(to)) 4) (forEach Site (sites Track) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (mapEntry (mover))) count:(count at:(site))))) (if (> (count at:(to)) 1) (moveAgain))))))))} (end (if (all Sites (sites Track) if:(= 0 (count at:(site)))) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
2x6 board with two stores. Four counters in each hole. Sowing occurs in an anti-clockwise direction. When the final counter lands in an occupied hole the counters are picked up and sowing continues, unless the hole contained three counters, causing it to contain four, in which case the counters are captured. An unbroken sequence of holes with four counters in them behind the hole from which the first capture was made are also captured. In addition, any holes which were sown into during the course of the turn which now contain four counters are captured by the owner of the row. Play continues until there are only eight counters left. The first player to make a capture with these eight counters captures them all. The player with the most counters wins.
###Ludii
(game "Duene" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Playing" (play (move Select (from (if (is Prev Mover) (sites {(var "To")}) (sites Mover)) if:(< 0 (count at:(from)))) (then (do (and (set Var "From" (last From)) (sow apply:(and (set Var "To" (to)) (if (= (count at:(to)) 4) (fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) (if (> (count at:(to)) 1) (moveAgain)))) backtracking:(= (count at:(to)) 4))) next:(and {(pass) (forEach Site (forEach (sites Track from:(var "From") to:(var "To")) if:(and (is In (site) (sites P1)) (= 4 (count at:(site))))) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site)))) (forEach Site (forEach (sites Track from:(var "From") to:(var "To")) if:(and (is In (site) (sites P2)) (= 4 (count at:(site))))) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))}))))) (nextPhase (<= (count in:(sites Track)) 8) "EndGame")) (phase "EndGame" (play (move Select (from (if (is Prev Mover) (sites {(var "To")}) (sites Mover)) if:(< 0 (count at:(from)))) (then (sow apply:(if (= (count at:(to)) 4) (forEach Site (sites Track) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (mapEntry (mover))) count:(count at:(site))))) (if (> (count at:(to)) 1) (moveAgain))))))))} (end (if (all Sites (sites Track) if:(= 0 (count at:(site)))) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
2x40-50 board. Each team controls one row. Play begins with each hole containing four counters (usually seeds or pebbles). A player picks up the counters in a hole in his team's row and sows them in a counterclockwise fashion, one in each consecutive hole. If the last counter is deposited into a hole containing counter, those counters are picked up and the player continues sowing. The turn continues in this fashion until the last counter falls into an empty hole. If this empty hole is on the player's side, the counters in the opposite hole in the other team's row are captured. The counter also causing the capture is taken. Play continues until one team cannot move, and the remaining counters are captured by the other team. The team with the most seeds wins. Each row has 40 holes. | (game "En Gehe" (players 2) (equipment {(mancalaBoard 2 40 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (> (count at:(to)) 1) (moveAgain) (if (and (is In (to) (sites Mover)) (> (count at:(if (is Mover P1) (+ (to) 40) (- (to) 40))) 0)) (and (fromTo (from (if (is Mover P1) (+ (to) 40) (- (to) 40))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 40) (- (to) 40)))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))))))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) | ###Description
2x40-50 board. Each team controls one row. Play begins with each hole containing four counters (usually seeds or pebbles). A player picks up the counters in a hole in his team's row and sows them in a counterclockwise fashion, one in each consecutive hole. If the last counter is deposited into a hole containing counter, those counters are picked up and the player continues sowing. The turn continues in this fashion until the last counter falls into an empty hole. If this empty hole is on the player's side, the counters in the opposite hole in the other team's row are captured. The counter also causing the capture is taken. Play continues until one team cannot move, and the remaining counters are captured by the other team. The team with the most seeds wins. Each row has 40 holes.
###Ludii
(game "En Gehe" (players 2) (equipment {(mancalaBoard 2 40 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (> (count at:(to)) 1) (moveAgain) (if (and (is In (to) (sites Mover)) (> (count at:(if (is Mover P1) (+ (to) 40) (- (to) 40))) 0)) (and (fromTo (from (if (is Mover P1) (+ (to) 40) (- (to) 40))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 40) (- (to) 40)))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))))))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) |
2x6 board with two store holes on either end. Play begins with four counters in each row. For the opening move, a player may take all of the counters in one hole and add them to the next hole. Play continues with players sowing from any one of the holes in their row in an anti-clockwise direction. If a sowing reaches the hole from which the sowing began, this hole is skipped. If the final counter falls in a hole containing three counters, thus making it contain four counters, these are captured. An unbroken sequence of holes containing four counters moving backwards from the final hole are also captured. Single counters cannot be sown. If a player cannot move, the opponent must sow in a way that allows them to play on the next turn. Play continues until one player has no counters on their side of the board. The player with the most captured counters wins. | (game "English Wari (St. Lucia)" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Init" (play (move Select (from (sites Mover)) (then (fromTo (from (last To)) (to (trackSite Move from:(last To) steps:1)) count:(count at:(last To)))))) (nextPhase (= (next) 1) "Sowing")) (phase "Sowing" (play (do (move Select (from (sites Mover) if:(> (count at:(from)) 1)) (then (sow if:(= (count at:(to)) 4) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) includeSelf:False backtracking:True))) ifAfterwards:(if (is Mover P1) (not (and {(< (count at:7) 2) (< (count at:8) 2) (< (count at:9) 2) (< (count at:10) 2) (< (count at:11) 2) (< (count at:12) 2)})) (not (and {(< (count at:1) 2) (< (count at:2) 2) (< (count at:3) 2) (< (count at:4) 2) (< (count at:5) 2) (< (count at:6) 2)}))))))} (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
2x6 board with two store holes on either end. Play begins with four counters in each row. For the opening move, a player may take all of the counters in one hole and add them to the next hole. Play continues with players sowing from any one of the holes in their row in an anti-clockwise direction. If a sowing reaches the hole from which the sowing began, this hole is skipped. If the final counter falls in a hole containing three counters, thus making it contain four counters, these are captured. An unbroken sequence of holes containing four counters moving backwards from the final hole are also captured. Single counters cannot be sown. If a player cannot move, the opponent must sow in a way that allows them to play on the next turn. Play continues until one player has no counters on their side of the board. The player with the most captured counters wins.
###Ludii
(game "English Wari (St. Lucia)" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Init" (play (move Select (from (sites Mover)) (then (fromTo (from (last To)) (to (trackSite Move from:(last To) steps:1)) count:(count at:(last To)))))) (nextPhase (= (next) 1) "Sowing")) (phase "Sowing" (play (do (move Select (from (sites Mover) if:(> (count at:(from)) 1)) (then (sow if:(= (count at:(to)) 4) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) includeSelf:False backtracking:True))) ifAfterwards:(if (is Mover P1) (not (and {(< (count at:7) 2) (< (count at:8) 2) (< (count at:9) 2) (< (count at:10) 2) (< (count at:11) 2) (< (count at:12) 2)})) (not (and {(< (count at:1) 2) (< (count at:2) 2) (< (count at:3) 2) (< (count at:4) 2) (< (count at:5) 2) (< (count at:6) 2)}))))))} (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
2x6 board, with a storage hole on either end. The game starts with four counters in each hole. A player picks up all of the counters in one of the holes in their row and sows them one-by-one in a counterclockwise direction in consecutive holes from the hole the pieces originated. The starting hole is always left empty, even if a player sows in a complete circuit of the board, the original house is skipped and sowing continues in the next hole after it. When the final counter of a sowing lands in a hole with three counters, the owner of that hole captures the counters. If an opponent's holes are all empty, the other player must make a move placing counters in the opponent's row. If not possible, the player captures all the counters in their row. The player who has captured the most counters wins. If the game continues in a repeating loop, the players can agree to end the game and capture the counters remaining in their row. | (game "Enindji" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) (play (if (is Proposed "End") (or (move Vote "End") (move Vote "No")) (or (if (is Cycle) (move Propose "End")) (do (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow if:(= (count at:(to)) 4) apply:(fromTo (from (to)) (to (if (is In (to) (sites P1)) (mapEntry 1) (mapEntry 2))) count:(count at:(to))) includeSelf:False))) ifAfterwards:(< 0 (count in:(sites Next))))))) (end (if (and (no Moves Mover) (no Moves Next)) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
2x6 board, with a storage hole on either end. The game starts with four counters in each hole. A player picks up all of the counters in one of the holes in their row and sows them one-by-one in a counterclockwise direction in consecutive holes from the hole the pieces originated. The starting hole is always left empty, even if a player sows in a complete circuit of the board, the original house is skipped and sowing continues in the next hole after it. When the final counter of a sowing lands in a hole with three counters, the owner of that hole captures the counters. If an opponent's holes are all empty, the other player must make a move placing counters in the opponent's row. If not possible, the player captures all the counters in their row. The player who has captured the most counters wins. If the game continues in a repeating loop, the players can agree to end the game and capture the counters remaining in their row.
###Ludii
(game "Enindji" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) (play (if (is Proposed "End") (or (move Vote "End") (move Vote "No")) (or (if (is Cycle) (move Propose "End")) (do (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow if:(= (count at:(to)) 4) apply:(fromTo (from (to)) (to (if (is In (to) (sites P1)) (mapEntry 1) (mapEntry 2))) count:(count at:(to))) includeSelf:False))) ifAfterwards:(< 0 (count in:(sites Next))))))) (end (if (and (no Moves Mover) (no Moves Next)) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
2x6 board, with stores on either end. The store to a player's left belongs to them. Four counters in each hole. Players sow in an anti-clockwise direction from any hole in their row. When the final counter lands in a hole in the opponent's row, causing it to contain two or four counters, these are captured and put in the store. The player also captures the contents of any adjacent holes in the opponent's row if they also contain two or four counters. Play continues until one player has no counters in their row, their opponent capturing the remaining counters. A new round begins. Players fill up their holes with four counters, beginning from the left. Any excess counters are placed in that player's store; the final hole of the player with fewer counters may contain fewer than four counters. Any empty holes are out of play. Play continues as before. The game repeats in this fashion until one player has no counters remaining, their opponent is the winner. | (game "Erherhe" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (map "LeftMost" {(pair P1 1) (pair P2 12)}) (piece "Seed" Shared)}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or {(move Select (from (sites Mover) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow apply:(if (and (is In (to) (sites Next)) (or (= 2 (count at:(to))) (= 4 (count at:(to))))) (and {(fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to))) (if (!= (to) (ahead (to) W)) (if (or (= 2 (count at:(ahead (to) W))) (= 4 (count at:(ahead (to) W)))) (fromTo (from (ahead (to) W)) (to (mapEntry Mover)) count:(count at:(ahead (to) W))))) (if (!= (to) (ahead (to) E)) (if (or (= 2 (count at:(ahead (to) E))) (= 4 (count at:(ahead (to) E)))) (fromTo (from (ahead (to) E)) (to (mapEntry Mover)) count:(count at:(ahead (to) E)))))})) skipIf:(not (is In (to) (sites (values Remembered "Playable")))))))} (then (if (or (all Sites (sites Bottom) if:(= 0 (count at:(site)))) (all Sites (sites Top) if:(= 0 (count at:(site))))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site)))) (forget Value "Playable" All)}))))) (end (if (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) {(if (= 0 (count at:(mapEntry P1))) (result P2 Win)) (if (= 0 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 4 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:4 (then (remember Value "Playable" (last To)))) (move (from (mapEntry Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:(count at:(mapEntry Mover)) (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x6 board, with stores on either end. The store to a player's left belongs to them. Four counters in each hole. Players sow in an anti-clockwise direction from any hole in their row. When the final counter lands in a hole in the opponent's row, causing it to contain two or four counters, these are captured and put in the store. The player also captures the contents of any adjacent holes in the opponent's row if they also contain two or four counters. Play continues until one player has no counters in their row, their opponent capturing the remaining counters. A new round begins. Players fill up their holes with four counters, beginning from the left. Any excess counters are placed in that player's store; the final hole of the player with fewer counters may contain fewer than four counters. Any empty holes are out of play. Play continues as before. The game repeats in this fashion until one player has no counters remaining, their opponent is the winner.
###Ludii
(game "Erherhe" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (map "LeftMost" {(pair P1 1) (pair P2 12)}) (piece "Seed" Shared)}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or {(move Select (from (sites Mover) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow apply:(if (and (is In (to) (sites Next)) (or (= 2 (count at:(to))) (= 4 (count at:(to))))) (and {(fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to))) (if (!= (to) (ahead (to) W)) (if (or (= 2 (count at:(ahead (to) W))) (= 4 (count at:(ahead (to) W)))) (fromTo (from (ahead (to) W)) (to (mapEntry Mover)) count:(count at:(ahead (to) W))))) (if (!= (to) (ahead (to) E)) (if (or (= 2 (count at:(ahead (to) E))) (= 4 (count at:(ahead (to) E)))) (fromTo (from (ahead (to) E)) (to (mapEntry Mover)) count:(count at:(ahead (to) E)))))})) skipIf:(not (is In (to) (sites (values Remembered "Playable")))))))} (then (if (or (all Sites (sites Bottom) if:(= 0 (count at:(site)))) (all Sites (sites Top) if:(= 0 (count at:(site))))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site)))) (forget Value "Playable" All)}))))) (end (if (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) {(if (= 0 (count at:(mapEntry P1))) (result P2 Win)) (if (= 0 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 4 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:4 (then (remember Value "Playable" (last To)))) (move (from (mapEntry Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:(count at:(mapEntry Mover)) (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "Sowing"))})) |
The board has two rows of six play pits with a larger scoring pit on either end. Play begins with four seeds in each hole, with one or two seeds moved to make the initial position fair, i.e. two perfect players will draw. Each player controls the row nearest them. Play consists of choosing one of the player's non-empty play pits, removing the pieces from it, and sowing the pieces one per pit consecutively in a counterclockwise pattern including the player's own scoring pit but not the opponent's. If the last piece is placed in a player's empty pit, that piece and any opposite are captured and put in the player's scoring pit. If the last seed falls in the scoring pit, the player gets another turn. When one player has no pieces in any of their play pits, the game ends. The other player captures all of the other pieces, and the player with the most scored pieces wins. FairKalah board 1 | (game "FairKalah" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "0,ESE,E,ENE,WNW,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 LastSite) (pair P2 FirstSite)}) (piece "Seed" Shared)}) (rules (start {(set Count 4 at:1) (set Count 4 at:2) (set Count 5 at:3) (set Count 4 at:4) (set Count 3 at:5) (set Count 4 at:6) (set Count 0 at:13) (set Count 4 at:12) (set Count 4 at:11) (set Count 4 at:10) (set Count 4 at:9) (set Count 4 at:8) (set Count 4 at:7) (set Count 0 at:0)}) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow apply:(if (= (to) (mapEntry (mover))) (moveAgain) (if (and {(is In (to) (sites Mover)) (= (count at:(to)) 1) (>= (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))) 0)}) (and (fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (mapEntry (mover))) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))))) skipIf:(= (to) (mapEntry (next))))))) (end (if (or (= (count in:(sites Bottom)) 0) (= (count in:(sites Top)) 0)) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
The board has two rows of six play pits with a larger scoring pit on either end. Play begins with four seeds in each hole, with one or two seeds moved to make the initial position fair, i.e. two perfect players will draw. Each player controls the row nearest them. Play consists of choosing one of the player's non-empty play pits, removing the pieces from it, and sowing the pieces one per pit consecutively in a counterclockwise pattern including the player's own scoring pit but not the opponent's. If the last piece is placed in a player's empty pit, that piece and any opposite are captured and put in the player's scoring pit. If the last seed falls in the scoring pit, the player gets another turn. When one player has no pieces in any of their play pits, the game ends. The other player captures all of the other pieces, and the player with the most scored pieces wins. FairKalah board 1
###Ludii
(game "FairKalah" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "0,ESE,E,ENE,WNW,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 LastSite) (pair P2 FirstSite)}) (piece "Seed" Shared)}) (rules (start {(set Count 4 at:1) (set Count 4 at:2) (set Count 5 at:3) (set Count 4 at:4) (set Count 3 at:5) (set Count 4 at:6) (set Count 0 at:13) (set Count 4 at:12) (set Count 4 at:11) (set Count 4 at:10) (set Count 4 at:9) (set Count 4 at:8) (set Count 4 at:7) (set Count 0 at:0)}) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow apply:(if (= (to) (mapEntry (mover))) (moveAgain) (if (and {(is In (to) (sites Mover)) (= (count at:(to)) 1) (>= (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))) 0)}) (and (fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (mapEntry (mover))) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))))) skipIf:(= (to) (mapEntry (next))))))) (end (if (or (= (count in:(sites Bottom)) 0) (= (count in:(sites Top)) 0)) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
2x6 board, divided in half and joined in the center with a single row of two holes. From the left, Five, five, three, three, five, and five counters in each hole of the double-row holes, four counters in the single row holes. Each player owns the row closest to them, but neither player controls the holes in the single row. Sowing begins from one of the holes in the player's row, and continues in an anti-clockwise direction. If the final counter lands in an occupied hole, these counters are picked up and sowing continues, unless the hole is in the single row, in which case the turn comes to an end. When the final counter falls in an empty hole in the player's row, the contents of the hole in the opponent's row adjacent to it are captured, along with the final counter of the sowing. However, if the hole from which the capture would be made contained three counters, these plus the final counter of the sowing are divided between the last hole of the sowing and the hole from which the capture would be made, i.e. two counters per each hole. The player then owns both of these holes, but cannot sow from them. The player also chooses at this point one of the holes in the single row to own, but the player still cannot begin sowing from it. Play continues until one player cannot play, and the players collect all of the counters from the holes they own. If one or both holes in the single row have not been claimed, the counters remain in them for the next round. The next round begins with the losing player filling as many holes in their row as possible, beginning from their left, according to the original starting number. After as many holes as possible are filled to the original capacity, the remaining are placed in the next hole, or in an empty central hole. The opponent matches the arrangement in their own holes that are opposite the ones the other player can fill. If the losing player has fewer than five counters, they place one in each hole, starting from their left, and the opponent matches this arrangement. Play continues like this until one player has no more counters. | (game "Fergen Gobale" (players 2) (equipment {(board (merge {(rectangle 2 3) (shift 5 0 (rectangle 2 3)) (shift 3 0.5 (rectangle 1 2))}) {(track "Track" "0,E,12,13,6,E,N,W,13,12,5,W" loop:True) (track "TrackFill" "0,E,6,E,N,W,5,W" loop:True)} use:Vertex) (piece "Seed" Shared) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (regions "Central" (sites Centre)) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 11)}) (map "CorrespondingHoles" {(pair 0 11) (pair 1 10) (pair 2 9) (pair 6 5) (pair 7 4) (pair 8 3) (pair 5 6) (pair 4 7) (pair 3 8) (pair 9 2) (pair 10 1) (pair 11 0)}) (map "InitialCount" {(pair 0 5) (pair 1 5) (pair 2 3) (pair 6 3) (pair 7 5) (pair 8 5) (pair 3 5) (pair 4 5) (pair 5 3) (pair 9 3) (pair 10 5) (pair 11 5)})}) (rules (start {(set Count 5 to:(sites {"A1" "B1" "A2" "B2" "G2" "H2" "G1" "H1" "H2"})) (set Count 4 to:(sites {"D1" "E1"})) (set Count 3 to:(sites {"C1" "F1" "C2" "F2"})) (set RememberValue "Playable" (sites Board))}) phases:{(phase "Sowing" (play (if (is Pending) (move Select (from (sites "Central") if:(= 0 (state at:(from)))) (then (set State at:(last To) (mover)))) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover "Home")) if:(and {(= 0 (state at:(from))) (is In (from) (sites (values Remembered "Playable"))) (is Occupied (from))})) (then (sow "Track" apply:(if (< 1 (count at:(to))) (if (and (= 0 (state at:(to))) (not (is In (to) (sites "Central")))) (and (moveAgain) (set Var "Replay" (to)))) (if (is In (to) (sites Mover "Home")) (if (= 3 (count at:(if (is Mover P1) (+ (to) 3) (- (to) 3)))) (and {(fromTo (from (if (is Mover P1) (+ (to) 3) (- (to) 3))) (to (to)) count:1) (set State at:(to) (mover)) (set State at:(if (is Mover P1) (+ (to) 3) (- (to) 3)) (mover)) (moveAgain) (set Pending)}) (and (fromTo (from (to)) (to (handSite Mover)) count:1) (if (is Occupied (if (is Mover P1) (+ (to) 3) (- (to) 3))) (fromTo (from (if (is Mover P1) (+ (to) 3) (- (to) 3))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 3) (- (to) 3))))))))) skipIf:(and (not (is In (to) (sites "Central"))) (not (is In (to) (sites (values Remembered "Playable")))))))) (then (if (or (all Sites (sites P1 "Home") if:(or (is Empty (site)) (!= 0 (state at:(site))))) (all Sites (sites P2 "Home") if:(or (is Empty (site)) (!= 0 (state at:(site)))))) (and {(forEach Site (sites Board) (if (or (and (= 0 (state at:(site))) (is In (site) (sites P1 "Home"))) (= (state at:(site)) 1)) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))) (if (or (and (= 0 (state at:(site))) (is In (site) (sites P2 "Home"))) (= (state at:(site)) 2)) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))))) (if (< (+ (count Cell at:(handSite P1)) (count in:(forEach (sites Board) if:(or (and (= 0 (state at:(site))) (is In (site) (sites P1 "Home"))) (= (state at:(site)) P1))))) (+ (count Cell at:(handSite P2)) (count in:(forEach (sites Board) if:(or (and (= 0 (state at:(site))) (is In (site) (sites P2 "Home"))) (= (state at:(site)) P2)))))) (set NextPlayer (player 1)) (set NextPlayer (player 2))) (if (or (> 5 (+ (count Cell at:(handSite P1)) (count in:(forEach (sites Board) if:(or (and (= 0 (state at:(site))) (is In (site) (sites P1 "Home"))) (= (state at:(site)) P1)))))) (> 5 (+ (count Cell at:(handSite P2)) (count in:(forEach (sites Board) if:(or (and (= 0 (state at:(site))) (is In (site) (sites P2 "Home"))) (= (state at:(site)) P2))))))) (set Var "PlaceOne" 1)) (forget Value "Playable" All)}))))) (end (if (or (all Sites (sites P1 "Home") if:(or (is Empty (site)) (!= 0 (state at:(site))))) (all Sites (sites P2 "Home") if:(or (is Empty (site)) (!= 0 (state at:(site)))))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (or (all Sites (sites P1 "Home") if:(or (is Empty (site)) (!= 0 (state at:(site))))) (all Sites (sites P2 "Home") if:(or (is Empty (site)) (!= 0 (state at:(site)))))) "BetweenRounds")) (phase "BetweenRounds" (play (if (= 1 (var "PlaceOne")) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackFill" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:1 (then (and (remember Value "Playable" (last To)) (if (is Occupied (handSite Mover)) (moveAgain))))) (if (<= (mapEntry "InitialCount" (trackSite FirstSite "TrackFill" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackFill" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:(mapEntry "InitialCount" (trackSite FirstSite "TrackFill" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) (then (and (remember Value "Playable" (last To)) (if (is Occupied (handSite Mover)) (moveAgain))))) (if (all Sites (sites Mover "Home") if:(is Occupied (site))) (move (from (handSite Mover)) (to (if (is Empty 12) 12 13)) count:(count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackFill" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:(count Cell at:(handSite Mover)) (then (remember Value "Playable" (last To)))))) (then (if (is Empty (handSite Mover)) (and (forEach Site (sites Mover "Home") (if (is Occupied (site)) (and (remember Value "Playable" (mapEntry "CorrespondingHoles" (site))) (fromTo (from (handSite Next)) (to (mapEntry "CorrespondingHoles" (site))) count:(count at:(site)))))) (set Var "PlaceOne" 0)))))) (nextPhase (is Empty (handSite Mover)) "Sowing"))})) | ###Description
2x6 board, divided in half and joined in the center with a single row of two holes. From the left, Five, five, three, three, five, and five counters in each hole of the double-row holes, four counters in the single row holes. Each player owns the row closest to them, but neither player controls the holes in the single row. Sowing begins from one of the holes in the player's row, and continues in an anti-clockwise direction. If the final counter lands in an occupied hole, these counters are picked up and sowing continues, unless the hole is in the single row, in which case the turn comes to an end. When the final counter falls in an empty hole in the player's row, the contents of the hole in the opponent's row adjacent to it are captured, along with the final counter of the sowing. However, if the hole from which the capture would be made contained three counters, these plus the final counter of the sowing are divided between the last hole of the sowing and the hole from which the capture would be made, i.e. two counters per each hole. The player then owns both of these holes, but cannot sow from them. The player also chooses at this point one of the holes in the single row to own, but the player still cannot begin sowing from it. Play continues until one player cannot play, and the players collect all of the counters from the holes they own. If one or both holes in the single row have not been claimed, the counters remain in them for the next round. The next round begins with the losing player filling as many holes in their row as possible, beginning from their left, according to the original starting number. After as many holes as possible are filled to the original capacity, the remaining are placed in the next hole, or in an empty central hole. The opponent matches the arrangement in their own holes that are opposite the ones the other player can fill. If the losing player has fewer than five counters, they place one in each hole, starting from their left, and the opponent matches this arrangement. Play continues like this until one player has no more counters.
###Ludii
(game "Fergen Gobale" (players 2) (equipment {(board (merge {(rectangle 2 3) (shift 5 0 (rectangle 2 3)) (shift 3 0.5 (rectangle 1 2))}) {(track "Track" "0,E,12,13,6,E,N,W,13,12,5,W" loop:True) (track "TrackFill" "0,E,6,E,N,W,5,W" loop:True)} use:Vertex) (piece "Seed" Shared) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (regions "Central" (sites Centre)) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 11)}) (map "CorrespondingHoles" {(pair 0 11) (pair 1 10) (pair 2 9) (pair 6 5) (pair 7 4) (pair 8 3) (pair 5 6) (pair 4 7) (pair 3 8) (pair 9 2) (pair 10 1) (pair 11 0)}) (map "InitialCount" {(pair 0 5) (pair 1 5) (pair 2 3) (pair 6 3) (pair 7 5) (pair 8 5) (pair 3 5) (pair 4 5) (pair 5 3) (pair 9 3) (pair 10 5) (pair 11 5)})}) (rules (start {(set Count 5 to:(sites {"A1" "B1" "A2" "B2" "G2" "H2" "G1" "H1" "H2"})) (set Count 4 to:(sites {"D1" "E1"})) (set Count 3 to:(sites {"C1" "F1" "C2" "F2"})) (set RememberValue "Playable" (sites Board))}) phases:{(phase "Sowing" (play (if (is Pending) (move Select (from (sites "Central") if:(= 0 (state at:(from)))) (then (set State at:(last To) (mover)))) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover "Home")) if:(and {(= 0 (state at:(from))) (is In (from) (sites (values Remembered "Playable"))) (is Occupied (from))})) (then (sow "Track" apply:(if (< 1 (count at:(to))) (if (and (= 0 (state at:(to))) (not (is In (to) (sites "Central")))) (and (moveAgain) (set Var "Replay" (to)))) (if (is In (to) (sites Mover "Home")) (if (= 3 (count at:(if (is Mover P1) (+ (to) 3) (- (to) 3)))) (and {(fromTo (from (if (is Mover P1) (+ (to) 3) (- (to) 3))) (to (to)) count:1) (set State at:(to) (mover)) (set State at:(if (is Mover P1) (+ (to) 3) (- (to) 3)) (mover)) (moveAgain) (set Pending)}) (and (fromTo (from (to)) (to (handSite Mover)) count:1) (if (is Occupied (if (is Mover P1) (+ (to) 3) (- (to) 3))) (fromTo (from (if (is Mover P1) (+ (to) 3) (- (to) 3))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 3) (- (to) 3))))))))) skipIf:(and (not (is In (to) (sites "Central"))) (not (is In (to) (sites (values Remembered "Playable")))))))) (then (if (or (all Sites (sites P1 "Home") if:(or (is Empty (site)) (!= 0 (state at:(site))))) (all Sites (sites P2 "Home") if:(or (is Empty (site)) (!= 0 (state at:(site)))))) (and {(forEach Site (sites Board) (if (or (and (= 0 (state at:(site))) (is In (site) (sites P1 "Home"))) (= (state at:(site)) 1)) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))) (if (or (and (= 0 (state at:(site))) (is In (site) (sites P2 "Home"))) (= (state at:(site)) 2)) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))))) (if (< (+ (count Cell at:(handSite P1)) (count in:(forEach (sites Board) if:(or (and (= 0 (state at:(site))) (is In (site) (sites P1 "Home"))) (= (state at:(site)) P1))))) (+ (count Cell at:(handSite P2)) (count in:(forEach (sites Board) if:(or (and (= 0 (state at:(site))) (is In (site) (sites P2 "Home"))) (= (state at:(site)) P2)))))) (set NextPlayer (player 1)) (set NextPlayer (player 2))) (if (or (> 5 (+ (count Cell at:(handSite P1)) (count in:(forEach (sites Board) if:(or (and (= 0 (state at:(site))) (is In (site) (sites P1 "Home"))) (= (state at:(site)) P1)))))) (> 5 (+ (count Cell at:(handSite P2)) (count in:(forEach (sites Board) if:(or (and (= 0 (state at:(site))) (is In (site) (sites P2 "Home"))) (= (state at:(site)) P2))))))) (set Var "PlaceOne" 1)) (forget Value "Playable" All)}))))) (end (if (or (all Sites (sites P1 "Home") if:(or (is Empty (site)) (!= 0 (state at:(site))))) (all Sites (sites P2 "Home") if:(or (is Empty (site)) (!= 0 (state at:(site)))))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (or (all Sites (sites P1 "Home") if:(or (is Empty (site)) (!= 0 (state at:(site))))) (all Sites (sites P2 "Home") if:(or (is Empty (site)) (!= 0 (state at:(site)))))) "BetweenRounds")) (phase "BetweenRounds" (play (if (= 1 (var "PlaceOne")) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackFill" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:1 (then (and (remember Value "Playable" (last To)) (if (is Occupied (handSite Mover)) (moveAgain))))) (if (<= (mapEntry "InitialCount" (trackSite FirstSite "TrackFill" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackFill" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:(mapEntry "InitialCount" (trackSite FirstSite "TrackFill" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) (then (and (remember Value "Playable" (last To)) (if (is Occupied (handSite Mover)) (moveAgain))))) (if (all Sites (sites Mover "Home") if:(is Occupied (site))) (move (from (handSite Mover)) (to (if (is Empty 12) 12 13)) count:(count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackFill" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:(count Cell at:(handSite Mover)) (then (remember Value "Playable" (last To)))))) (then (if (is Empty (handSite Mover)) (and (forEach Site (sites Mover "Home") (if (is Occupied (site)) (and (remember Value "Playable" (mapEntry "CorrespondingHoles" (site))) (fromTo (from (handSite Next)) (to (mapEntry "CorrespondingHoles" (site))) count:(count at:(site)))))) (set Var "PlaceOne" 0)))))) (nextPhase (is Empty (handSite Mover)) "Sowing"))})) |
2x6 board. Four counters in each hole. A player picks up all of the counters in one of the holes in their row and sows them one-by-one in a clockwise direction in consecutive holes from the hole the pieces originated. The starting hole is always left empty, even if a player sows in a complete circuit of the board, the original house is skipped and sowing continues in the next hole after it. When the final counter falls into an occupied hole, these are picked up and sowing continues. When the final counter of a sowing lands in an empty hole in the player's own row, the contents of the hole in the opponent's row opposite it are captured. If the opponent's holes are all empty, the other player must make a move placing counters in the opponent's row. If not possible, the player captures all the counters in their row. The player who has captured the most counters wins. If the game continues in a repeating loop, the players can agree to end the game and capture the counters remaining in their row. | (game "Foji" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "5,W,N,E" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 4 to:(sites Track))) (play (if (is Proposed "End") (or (move Vote "End") (move Vote "No")) (or (if (is Cycle) (move Propose "End")) (if (is Prev Mover) (move Select (from (sites {(last To afterConsequence:True)})) (then (sow apply:(if (< 1 (count at:(to))) (moveAgain) (if (is In (to) (sites Mover)) (if (is Occupied (if (is Mover P1) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))))) includeSelf:False))) (do (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow apply:(if (< 1 (count at:(to))) (moveAgain) (if (is In (to) (sites Mover)) (if (is Occupied (if (is Mover P1) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))))) includeSelf:False))) ifAfterwards:(if (is Mover P1) (< 0 (count in:(sites P2))) (< 0 (count in:(sites P1))))))))) (end (if (or (no Moves Mover) (is Decided "End")) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) | ###Description
2x6 board. Four counters in each hole. A player picks up all of the counters in one of the holes in their row and sows them one-by-one in a clockwise direction in consecutive holes from the hole the pieces originated. The starting hole is always left empty, even if a player sows in a complete circuit of the board, the original house is skipped and sowing continues in the next hole after it. When the final counter falls into an occupied hole, these are picked up and sowing continues. When the final counter of a sowing lands in an empty hole in the player's own row, the contents of the hole in the opponent's row opposite it are captured. If the opponent's holes are all empty, the other player must make a move placing counters in the opponent's row. If not possible, the player captures all the counters in their row. The player who has captured the most counters wins. If the game continues in a repeating loop, the players can agree to end the game and capture the counters remaining in their row.
###Ludii
(game "Foji" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "5,W,N,E" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 4 to:(sites Track))) (play (if (is Proposed "End") (or (move Vote "End") (move Vote "No")) (or (if (is Cycle) (move Propose "End")) (if (is Prev Mover) (move Select (from (sites {(last To afterConsequence:True)})) (then (sow apply:(if (< 1 (count at:(to))) (moveAgain) (if (is In (to) (sites Mover)) (if (is Occupied (if (is Mover P1) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))))) includeSelf:False))) (do (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow apply:(if (< 1 (count at:(to))) (moveAgain) (if (is In (to) (sites Mover)) (if (is Occupied (if (is Mover P1) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))))) includeSelf:False))) ifAfterwards:(if (is Mover P1) (< 0 (count in:(sites P2))) (< 0 (count in:(sites P1))))))))) (end (if (or (no Moves Mover) (is Decided "End")) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) |
2x6 board, with a storage hole on either end. The game starts with four counters in each hole. A player picks up all of the counters in one of the holes in their row and sows them one-by-one in a counterclockwise direction in consecutive holes from the hole the pieces originated. The starting hole is always left empty, even if a player sows in a complete circuit of the board, the original house is skipped and sowing continues in the next hole after it. Players capture counters when the final counter is sown in the player's own row and the hole containing it has two or three counters (counting the counter just dropped into it). If the hole before it also has two or three counters, these are also captured and so on until reaching a hole without two or three counters or one not belonging to the player. If an opponent's holes are all empty, the other player must make a move placing counters in the opponent's row. If not possible, the player captures all the counters in their row. The player who has captured the most counters wins. If the game continues in a repeating loop, the players can agree to end the game and capture the counters remaining in their row. | (game "Fondji" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) (play (if (is Proposed "End") (or (move Vote "End") (move Vote "No")) (or (if (is Cycle) (move Propose "End")) (do (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow if:(and (is In (to) (sites Next)) (or (= (count at:(to)) 2) (= (count at:(to)) 3))) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) includeSelf:False backtracking:True))) ifAfterwards:(< 0 (count in:(sites Next))))))) (end (if (or (no Moves Mover) (is Decided "End")) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
2x6 board, with a storage hole on either end. The game starts with four counters in each hole. A player picks up all of the counters in one of the holes in their row and sows them one-by-one in a counterclockwise direction in consecutive holes from the hole the pieces originated. The starting hole is always left empty, even if a player sows in a complete circuit of the board, the original house is skipped and sowing continues in the next hole after it. Players capture counters when the final counter is sown in the player's own row and the hole containing it has two or three counters (counting the counter just dropped into it). If the hole before it also has two or three counters, these are also captured and so on until reaching a hole without two or three counters or one not belonging to the player. If an opponent's holes are all empty, the other player must make a move placing counters in the opponent's row. If not possible, the player captures all the counters in their row. The player who has captured the most counters wins. If the game continues in a repeating loop, the players can agree to end the game and capture the counters remaining in their row.
###Ludii
(game "Fondji" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) (play (if (is Proposed "End") (or (move Vote "End") (move Vote "No")) (or (if (is Cycle) (move Propose "End")) (do (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow if:(and (is In (to) (sites Next)) (or (= (count at:(to)) 2) (= (count at:(to)) 3))) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) includeSelf:False backtracking:True))) ifAfterwards:(< 0 (count in:(sites Next))))))) (end (if (or (no Moves Mover) (is Decided "End")) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
2x6 board. Play begins with four counters in each hole. Moves begin from any hole in the player's row and sowing proceeds in an anti-clockwise direction. If the final counter of a sowing lands in an occupied hole, these counters are lifted and sowing continues. If the final counter lands in an empty hole, any counters in the opposite hole are taken and the turn ends. Play continues until one player cannot move. When this happens, the other player captures the remaining counters and the game ends. The player with the most counters wins. | (game "French Wari" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (> (count at:(to)) 1) (moveAgain) (if (> (count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) 0) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))))))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) | ###Description
2x6 board. Play begins with four counters in each hole. Moves begin from any hole in the player's row and sowing proceeds in an anti-clockwise direction. If the final counter of a sowing lands in an occupied hole, these counters are lifted and sowing continues. If the final counter lands in an empty hole, any counters in the opposite hole are taken and the turn ends. Play continues until one player cannot move. When this happens, the other player captures the remaining counters and the game ends. The player with the most counters wins.
###Ludii
(game "French Wari" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (> (count at:(to)) 1) (moveAgain) (if (> (count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) 0) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))))))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) |
2x6 board. Three counters in each hole. Sowing occurs in an anti-clockwise direction. When the final counter falls into an occupied hole, the player picks up the counters in the next hole and continues sowing from it. If that next hole is empty, the turn ends. If the final counter falls into an empty hole, the contents of the following hole are captured. Play continues until one player can no longer play because there are no counters left on their side. The opponent then takes the remainder of the counters on the board. For the next round, each player counts out the counters they captured, placing three each of the holes in their row. For every three in excess of the amount required to fill all of the holes in a row, the player claims one hole from the opponent's row. Play continues in this fashion until one player captures all of the holes on the board. | (game "Gabata (Adegrat)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 11)})}) (rules (start {(set Count 3 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) steps:1)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(> (count at:(from)) 0)) (then (sow apply:(if (> (count at:(to)) 1) (if (>= (count at:(trackSite Move from:(to) steps:1)) 1) (moveAgain)) (if (>= (count at:(trackSite Move from:(to) steps:1)) 1) (fromTo (from (trackSite Move from:(to) steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) steps:1))))))))} (then (if (or (all Sites (sites P1) if:(= 0 (count at:(site)))) (all Sites (sites P2) if:(= 0 (count at:(site))))) (and {(if (all Sites (sites P1) if:(= 0 (count at:(site)))) (forEach Site (sites Board) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forEach Site (sites Board) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 3 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 3 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 3 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:3 (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x6 board. Three counters in each hole. Sowing occurs in an anti-clockwise direction. When the final counter falls into an occupied hole, the player picks up the counters in the next hole and continues sowing from it. If that next hole is empty, the turn ends. If the final counter falls into an empty hole, the contents of the following hole are captured. Play continues until one player can no longer play because there are no counters left on their side. The opponent then takes the remainder of the counters on the board. For the next round, each player counts out the counters they captured, placing three each of the holes in their row. For every three in excess of the amount required to fill all of the holes in a row, the player claims one hole from the opponent's row. Play continues in this fashion until one player captures all of the holes on the board.
###Ludii
(game "Gabata (Adegrat)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 11)})}) (rules (start {(set Count 3 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) steps:1)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(> (count at:(from)) 0)) (then (sow apply:(if (> (count at:(to)) 1) (if (>= (count at:(trackSite Move from:(to) steps:1)) 1) (moveAgain)) (if (>= (count at:(trackSite Move from:(to) steps:1)) 1) (fromTo (from (trackSite Move from:(to) steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) steps:1))))))))} (then (if (or (all Sites (sites P1) if:(= 0 (count at:(site)))) (all Sites (sites P2) if:(= 0 (count at:(site))))) (and {(if (all Sites (sites P1) if:(= 0 (count at:(site)))) (forEach Site (sites Board) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forEach Site (sites Board) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 3 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 3 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 3 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:3 (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))))))) (nextPhase (all Passed) "Sowing"))})) |
2x6 board. Three counters in each hole. The players begin the game simultaneously sowing first from their rightmost hole, racing to be the first one to drop the last counter of a sowing into an empty hole. This player then begins the next phase where they alternate play. Sowing occurs in an anti-clockwise direction. When the final counter falls into an occupied hole, the contents of this hole are picked up and sowing continues. When the final counter lands into an empty hole in the row belonging to the player, the counters in the opposite hole belonging to the opponent are captured, and the counter that triggered the capture is moved to the following hole. This could trigger the further capture of more of the opponent's counters if the hole in which the counter is placed was empty and the opponent's opposite hole contains counters. If the hole is occupied, sowing continues. If the hole is empty and the opposite hole is unoccupied or it is one of the opponent's holes, sowing ends. When one player can no longer play because the holes on their side are empty, the opponent captures the remaining counters on the board. A new round begins. The losing player places three counters in each hole, beginning on the rightmost hole. If the player has remaining counters but cannot fill their holes with three, they must distribute the remainder to fill as many of the remaining holes as possible with at least one counter. The winning player from the previous round then matches this starting configuration, keeping any surplus for use in future rounds. Play continues until one player has one or zero counters, the opponent being the winner. | (game "Gabata (Ansaba)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 11)}) (map "CorrespondingHoles" {(pair 0 11) (pair 1 10) (pair 2 9) (pair 3 8) (pair 4 7) (pair 5 6) (pair 6 5) (pair 7 4) (pair 8 3) (pair 9 2) (pair 10 1) (pair 11 0)})}) (rules (start (set Count 3 to:(sites Track))) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (> (count at:(to)) 1) (moveAgain) (if (is In (to) (sites Mover)) (if (!= 0 (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6)))) (and (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6)))) (moveAgain))))))))} (then (if (or (all Sites (sites P1) if:(= 0 (count at:(site)))) (all Sites (sites P2) if:(= 0 (count at:(site))))) (if (all Sites (sites P1) if:(= 0 (count at:(site)))) (and (forEach Site (sites Board) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (if (>= (count Cell at:(handSite P1)) (+ (count Cell at:(handSite P2)) (count in:(sites Board)))) (set NextPlayer (player 2)) (set NextPlayer (player 1)))) (and (forEach Site (sites Board) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (if (>= (count Cell at:(handSite P2)) (+ (count Cell at:(handSite P1)) (count in:(sites Board)))) (set NextPlayer (player 1)) (set NextPlayer (player 2))))))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 2 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 2 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 3 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:3) (move (from (handSite Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:1) (then (if (!= 0 (count Cell at:(handSite Mover))) (moveAgain) (forEach Site (sites Mover) (if (is Occupied (site)) (fromTo (from (handSite Next)) (to (mapEntry "CorrespondingHoles" (site))) count:(count at:(site))))))))) (nextPhase (or (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) | ###Description
2x6 board. Three counters in each hole. The players begin the game simultaneously sowing first from their rightmost hole, racing to be the first one to drop the last counter of a sowing into an empty hole. This player then begins the next phase where they alternate play. Sowing occurs in an anti-clockwise direction. When the final counter falls into an occupied hole, the contents of this hole are picked up and sowing continues. When the final counter lands into an empty hole in the row belonging to the player, the counters in the opposite hole belonging to the opponent are captured, and the counter that triggered the capture is moved to the following hole. This could trigger the further capture of more of the opponent's counters if the hole in which the counter is placed was empty and the opponent's opposite hole contains counters. If the hole is occupied, sowing continues. If the hole is empty and the opposite hole is unoccupied or it is one of the opponent's holes, sowing ends. When one player can no longer play because the holes on their side are empty, the opponent captures the remaining counters on the board. A new round begins. The losing player places three counters in each hole, beginning on the rightmost hole. If the player has remaining counters but cannot fill their holes with three, they must distribute the remainder to fill as many of the remaining holes as possible with at least one counter. The winning player from the previous round then matches this starting configuration, keeping any surplus for use in future rounds. Play continues until one player has one or zero counters, the opponent being the winner.
###Ludii
(game "Gabata (Ansaba)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 11)}) (map "CorrespondingHoles" {(pair 0 11) (pair 1 10) (pair 2 9) (pair 3 8) (pair 4 7) (pair 5 6) (pair 6 5) (pair 7 4) (pair 8 3) (pair 9 2) (pair 10 1) (pair 11 0)})}) (rules (start (set Count 3 to:(sites Track))) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (> (count at:(to)) 1) (moveAgain) (if (is In (to) (sites Mover)) (if (!= 0 (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6)))) (and (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6)))) (moveAgain))))))))} (then (if (or (all Sites (sites P1) if:(= 0 (count at:(site)))) (all Sites (sites P2) if:(= 0 (count at:(site))))) (if (all Sites (sites P1) if:(= 0 (count at:(site)))) (and (forEach Site (sites Board) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (if (>= (count Cell at:(handSite P1)) (+ (count Cell at:(handSite P2)) (count in:(sites Board)))) (set NextPlayer (player 2)) (set NextPlayer (player 1)))) (and (forEach Site (sites Board) (if (< 0 (count at:(site))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (if (>= (count Cell at:(handSite P2)) (+ (count Cell at:(handSite P1)) (count in:(sites Board)))) (set NextPlayer (player 1)) (set NextPlayer (player 2))))))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 2 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 2 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 3 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:3) (move (from (handSite Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:1) (then (if (!= 0 (count Cell at:(handSite Mover))) (moveAgain) (forEach Site (sites Mover) (if (is Occupied (site)) (fromTo (from (handSite Next)) (to (mapEntry "CorrespondingHoles" (site))) count:(count at:(site))))))))) (nextPhase (or (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) |
2x6 board. Four counters per hole. Each player takes their first turn from their leftmost hole. Sowing occurs in an anti-clockwise direction. If the final counter falls into an occupied hole, these are picked up and sowing continues. If the final counter falls into an empty hole, the turn ends. At any time during the sowing, if a hole is made to contain four counters, the owner of the hole in which the four counters are located captures them, unless it is the final hole of the sowing, in which case the player who is sowing captures them. The captures happen immediately. If a player does not capture when they should have, and a subsequent sowing causes this hole to contain five counters, it becomes a Jen. Players can no longer capture from a Jen in the same manner as before. Captures are made from it when the final counter of a sowing lands in it, in which case the final counter and one counter from the Jen are captured by the player who is sowing. Play continues until a player can no longer move because there are no counters in their row, and the opponent captures the remaining counters. Players then count their pieces by placing four in each hole, and the player who has more than their original number takes ownership of one of the opponent's holes for every four counters more than the original number that have been taken. If no player took four more than the original, the player with three extra gets the hole, if each player has two extra the weaker player is given the two extra counters. Play then begins again as before. The game ends when one player owns all of the counters, and thus all of the holes. | (game "Gabata (Ghinda)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "LeftMost" {(pair P1 0) (pair P2 11)})}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 4 to:(sites Track "Track"))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (= 1 (value Player Mover)) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2"))) (sites {(mapEntry "LeftMost" Mover)}))) if:(is Occupied (from))) (then (and (do (set Var "NumSowed" (count at:(last To))) next:(sow apply:(if (< 1 (count at:(to))) (if (= 4 (count at:(to))) (fromTo (from (to)) (to (handSite Mover)) count:4) (and (moveAgain) (set Var "Replay" (to)))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(- (var "NumSowed") 1))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (if (is In (site) (sites (values Remembered "OwnedP1"))) (handSite P1) (handSite P2))) count:4))) (set Var "NumSowed" 0)))) (if (!= 1 (value Player Mover)) (set Value Mover 1)))))} (then (if (or (all Sites (sites (values Remembered "OwnedP1")) if:(= 0 (count at:(site)))) (all Sites (sites (values Remembered "OwnedP2")) if:(= 0 (count at:(site))))) (and {(if (all Sites (sites (values Remembered "OwnedP2")) if:(= 0 (count at:(site)))) (forEach Site (sites Board) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (sites Board) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:4 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 4 (count Cell at:(handSite Mover))) (moveAgain) (if (= 3 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:3) (fromTo (from (handSite Next)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))))}) (if (= 2 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:2) (fromTo (from (handSite Next)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:2) (if (< 50 (value Random (range 1 100))) (remember Value "OwnedP1" (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))))}))))}))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) | ###Description
2x6 board. Four counters per hole. Each player takes their first turn from their leftmost hole. Sowing occurs in an anti-clockwise direction. If the final counter falls into an occupied hole, these are picked up and sowing continues. If the final counter falls into an empty hole, the turn ends. At any time during the sowing, if a hole is made to contain four counters, the owner of the hole in which the four counters are located captures them, unless it is the final hole of the sowing, in which case the player who is sowing captures them. The captures happen immediately. If a player does not capture when they should have, and a subsequent sowing causes this hole to contain five counters, it becomes a Jen. Players can no longer capture from a Jen in the same manner as before. Captures are made from it when the final counter of a sowing lands in it, in which case the final counter and one counter from the Jen are captured by the player who is sowing. Play continues until a player can no longer move because there are no counters in their row, and the opponent captures the remaining counters. Players then count their pieces by placing four in each hole, and the player who has more than their original number takes ownership of one of the opponent's holes for every four counters more than the original number that have been taken. If no player took four more than the original, the player with three extra gets the hole, if each player has two extra the weaker player is given the two extra counters. Play then begins again as before. The game ends when one player owns all of the counters, and thus all of the holes.
###Ludii
(game "Gabata (Ghinda)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "LeftMost" {(pair P1 0) (pair P2 11)})}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 4 to:(sites Track "Track"))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (= 1 (value Player Mover)) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2"))) (sites {(mapEntry "LeftMost" Mover)}))) if:(is Occupied (from))) (then (and (do (set Var "NumSowed" (count at:(last To))) next:(sow apply:(if (< 1 (count at:(to))) (if (= 4 (count at:(to))) (fromTo (from (to)) (to (handSite Mover)) count:4) (and (moveAgain) (set Var "Replay" (to)))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(- (var "NumSowed") 1))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (if (is In (site) (sites (values Remembered "OwnedP1"))) (handSite P1) (handSite P2))) count:4))) (set Var "NumSowed" 0)))) (if (!= 1 (value Player Mover)) (set Value Mover 1)))))} (then (if (or (all Sites (sites (values Remembered "OwnedP1")) if:(= 0 (count at:(site)))) (all Sites (sites (values Remembered "OwnedP2")) if:(= 0 (count at:(site))))) (and {(if (all Sites (sites (values Remembered "OwnedP2")) if:(= 0 (count at:(site)))) (forEach Site (sites Board) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (sites Board) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:4 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 4 (count Cell at:(handSite Mover))) (moveAgain) (if (= 3 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:3) (fromTo (from (handSite Next)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))))}) (if (= 2 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:2) (fromTo (from (handSite Next)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:2) (if (< 50 (value Random (range 1 100))) (remember Value "OwnedP1" (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))))}))))}))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) |
2x6 board. Four counters in each hole. Play begins with a stylised move. One player takes the four counters in their leftmost hole and places them into the next hole, moving in an anti-clockwise direction. They then take the four counters in the next hole, and place them in the following holes. This continues until the entire board has an alternation pattern of a hole with eight counters followed by one with zero counters. The player then sows beginning from the final hole with eight counters they created. When the final counter of a sowing lands in a hole with counters, the player picks up these counters and sowing continues. When the final counter falls into an empty hole, the turn ends. At any time during the sowing a hole is made to contain four counters, they are captured by the player who is sowing, except when it is the final hole of a sowing, in which case they are picked up and sowing continues. If a player cannot play, they must pass their turn and may resume play when they are next able. When all of the counters have been captured, the player who captured the most counters wins. | (game "Gabata (Oromo)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Opening1" (play (move Select (from (if (is Prev Mover) (var "Replay") 0)) (then (sow numPerHole:4 apply:(and (moveAgain) (if (is Occupied (trackSite Move from:(to) "Track" steps:1)) (set Var "Replay" (trackSite Move from:(to) "Track" steps:1)) (set Var "Replay" -1))))))) (nextPhase (= -1 (var "Replay")) "Opening2")) (phase "Opening2" (play (move Select (from (if (and (is Prev Mover) (!= -1 (var "Replay"))) (var "Replay") 6)) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(- (var "NumSowed") 1))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (handSite Mover)) count:4))) (set Var "NumSowed" 0))))))) (nextPhase (not (is Next Prev)) "Sowing")) (phase "Sowing" (play (move Select (from (if (and (is Prev Mover) (!= -1 (var "Replay"))) (sites {(var "Replay")}) (sites Mover)) if:(is Occupied (from))) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(- (var "NumSowed") 1))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (handSite Mover)) count:4))) (set Var "NumSowed" 0))))))))} (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) | ###Description
2x6 board. Four counters in each hole. Play begins with a stylised move. One player takes the four counters in their leftmost hole and places them into the next hole, moving in an anti-clockwise direction. They then take the four counters in the next hole, and place them in the following holes. This continues until the entire board has an alternation pattern of a hole with eight counters followed by one with zero counters. The player then sows beginning from the final hole with eight counters they created. When the final counter of a sowing lands in a hole with counters, the player picks up these counters and sowing continues. When the final counter falls into an empty hole, the turn ends. At any time during the sowing a hole is made to contain four counters, they are captured by the player who is sowing, except when it is the final hole of a sowing, in which case they are picked up and sowing continues. If a player cannot play, they must pass their turn and may resume play when they are next able. When all of the counters have been captured, the player who captured the most counters wins.
###Ludii
(game "Gabata (Oromo)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Opening1" (play (move Select (from (if (is Prev Mover) (var "Replay") 0)) (then (sow numPerHole:4 apply:(and (moveAgain) (if (is Occupied (trackSite Move from:(to) "Track" steps:1)) (set Var "Replay" (trackSite Move from:(to) "Track" steps:1)) (set Var "Replay" -1))))))) (nextPhase (= -1 (var "Replay")) "Opening2")) (phase "Opening2" (play (move Select (from (if (and (is Prev Mover) (!= -1 (var "Replay"))) (var "Replay") 6)) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(- (var "NumSowed") 1))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (handSite Mover)) count:4))) (set Var "NumSowed" 0))))))) (nextPhase (not (is Next Prev)) "Sowing")) (phase "Sowing" (play (move Select (from (if (and (is Prev Mover) (!= -1 (var "Replay"))) (sites {(var "Replay")}) (sites Mover)) if:(is Occupied (from))) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(- (var "NumSowed") 1))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (handSite Mover)) count:4))) (set Var "NumSowed" 0))))))))} (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) |
2x6 board. Four counters in each hole. Players draw lots to see who goes first. Players pick up the counters in any of the holes in their row and sow them in an anti-clockwise direction. If the last counter falls into a hole that is occupied, the player picks up the contents of this hole and continues to sow. When the last counter falls into an empty hole, the play ends. Capturing occurs when the last counter falls into a hole on the opponent's side of the board containing three counters, increasing it to four. This hole then belongs to the player who captured it. A player cannot pick up counters from this hole, and the opponent can only do so if the last counter of their sowing falls there, in which case the opponent takes one counter from it, along with the final counter. The captured hole remains in the ownership of the person who captured it. If it remains empty and the opponent drops their last counter into this hole, the last counter is removed. If a player cannot move, they pass, but the opponent may continue to make moves. The player could then resume play if the opponent's moves create a possibility for a move. Play ends when there are no more counters available to move. Each player owns the counters in their captured holes or which they have removed from the board. A second round is played, each player placing four counters into each hole starting from the rightmost hole in their row. The player with more counters gains a hole from their opponent for every four extra balls they've captured. If an opponent has three extra after counting in such a way, they also gain a hole, but not if there are one or two extra. Play continues in several rounds like this until one player takes all the counters. Each row has 6 holes. | (game "Gabata (Shoa I)" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 4 to:(sites Track))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(and (< 0 (count at:(from))) (= 0 (state at:(from))))) (then (sow "TrackCCW" apply:(if (and (= 0 (state at:(to))) (= 4 (count at:(to)))) (set State at:(to) (mover)) (if (< 1 (count at:(to))) (if (= 0 (state at:(to))) (and (moveAgain) (set Var "Replay" (to))) (if (!= (mover) (state at:(to))) (and (fromTo (from (to)) (to (handSite Mover)) count:(min 2 (count at:(to)))) (set State at:(to) (state at:(to)))))))))))} (then (if (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) (and {(forEach Site (forEach (sites Board) if:(= 1 (state at:(site)))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (forEach (sites Board) if:(= 2 (state at:(site)))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (set Var "Round" (+ 1 (var "Round")))}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (>= 1 (count Cell at:(handSite P1))) (result P2 Win)) (if (>= 1 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:4 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 4 (count Cell at:(handSite Mover))) (moveAgain) (if (= 3 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:3) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}) (if (= 2 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (if (< 50 (value Random (range 1 100))) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}))))}))) (then (if (and (is Empty (handSite P1)) (is Empty (handSite P2))) (and (if (is Even (var "Round")) (set NextPlayer (player 2)) (set NextPlayer (player 1))) (set Pending)))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) | ###Description
2x6 board. Four counters in each hole. Players draw lots to see who goes first. Players pick up the counters in any of the holes in their row and sow them in an anti-clockwise direction. If the last counter falls into a hole that is occupied, the player picks up the contents of this hole and continues to sow. When the last counter falls into an empty hole, the play ends. Capturing occurs when the last counter falls into a hole on the opponent's side of the board containing three counters, increasing it to four. This hole then belongs to the player who captured it. A player cannot pick up counters from this hole, and the opponent can only do so if the last counter of their sowing falls there, in which case the opponent takes one counter from it, along with the final counter. The captured hole remains in the ownership of the person who captured it. If it remains empty and the opponent drops their last counter into this hole, the last counter is removed. If a player cannot move, they pass, but the opponent may continue to make moves. The player could then resume play if the opponent's moves create a possibility for a move. Play ends when there are no more counters available to move. Each player owns the counters in their captured holes or which they have removed from the board. A second round is played, each player placing four counters into each hole starting from the rightmost hole in their row. The player with more counters gains a hole from their opponent for every four extra balls they've captured. If an opponent has three extra after counting in such a way, they also gain a hole, but not if there are one or two extra. Play continues in several rounds like this until one player takes all the counters. Each row has 6 holes.
###Ludii
(game "Gabata (Shoa I)" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 4 to:(sites Track))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(and (< 0 (count at:(from))) (= 0 (state at:(from))))) (then (sow "TrackCCW" apply:(if (and (= 0 (state at:(to))) (= 4 (count at:(to)))) (set State at:(to) (mover)) (if (< 1 (count at:(to))) (if (= 0 (state at:(to))) (and (moveAgain) (set Var "Replay" (to))) (if (!= (mover) (state at:(to))) (and (fromTo (from (to)) (to (handSite Mover)) count:(min 2 (count at:(to)))) (set State at:(to) (state at:(to)))))))))))} (then (if (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) (and {(forEach Site (forEach (sites Board) if:(= 1 (state at:(site)))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (forEach (sites Board) if:(= 2 (state at:(site)))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (set Var "Round" (+ 1 (var "Round")))}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (>= 1 (count Cell at:(handSite P1))) (result P2 Win)) (if (>= 1 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:4 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 4 (count Cell at:(handSite Mover))) (moveAgain) (if (= 3 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:3) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}) (if (= 2 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (if (< 50 (value Random (range 1 100))) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}))))}))) (then (if (and (is Empty (handSite P1)) (is Empty (handSite P2))) (and (if (is Even (var "Round")) (set NextPlayer (player 2)) (set NextPlayer (player 1))) (set Pending)))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) |
2x6 board. Four counters in each hole. The game begins with a stylised move. One player takes one counter from their rightmost hole, and holds in in their hand. They then take one counter from the next hole, moving in an anti-clockwise direction, and place it in the next hole. They then take a counter from the next hole after that, and placing it in the next hole, continuing until there is an alternating pattern of a hole with five counters followed by a hole with three counters. The original hole from which the first counter was taken will have four counters. The player will then place the first counter taken into the next hole in the opponent's row, causing it to hold four counters. This creates a weg, a hole captured by that player, which is involved in capturing (see below). Players alternate making this first move in subsequent rounds. The next phase begins once this stylised move is completed. Sowing occurs in an anti-clockwise direction. If the final counter of a sowing falls into a hole containing counters, these are picked up and sowing continues. A player's turn ends when the final counter falls into an empty hole. When the final counter of a sowing falls into a hole containing three counters, it creates a weg, and the turn ends. Players cannot sow from a weg they've captured. A player may capture counters from an opponent's weg when the final counter of a sowing falls into the opponent's weg on the player's turn. The final counter and one counter in the weg are captured. The player may then take the counters from any of their holes and sow from there. If a player cannot play, they must pass their turn, but may play again if this becomes possible in a subsequent turn. Play ends when there are no possible moves left on the board. Players then capture the counters in their wegs. A new round begins. The players fill as many of their holes with four counters as they are able. The player with more counters will capture as many holes from the opponent in which they can place four or more counters. If the player has three remaining counters after holes are filled with four, the opponent would cede their one remaining counter to the opponent to make four and the player captures one further hole. If there are two remaining, the players draw lots to determine which player owns the remaining hole. The player who played second in the previous round begins the new round with the same stylized move, and play continues as before after that. Play continues until one player owns no holes; the opponent wins. | (game "Gabata (Shoa and Adegrat)" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 4 to:(sites Track))}) phases:{(phase "Opening" (play (if (is Mover P1) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(trackSite Move from:(last From) "TrackCCW" steps:2)}) (sites {10}))) (then (sow count:1 "TrackCCW" apply:(if (not (is In (trackSite Move from:(from) "TrackCCW" steps:2) (intersection (sites Bottom) (sites Right)))) (moveAgain) (set State at:11 (mover)))))) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(trackSite Move from:(last From) "TrackCCW" steps:2)}) (sites {1}))) (then (sow count:1 "TrackCCW" apply:(if (not (is In (trackSite Move from:(from) "TrackCCW" steps:2) (intersection (sites Top) (sites Left)))) (moveAgain) (set State at:0 (mover)))))))) (nextPhase (if (is Mover P1) (is In (trackSite Move from:(last From) "TrackCCW" steps:2) (intersection (sites Bottom) (sites Right))) (is In (trackSite Move from:(last From) "TrackCCW" steps:2) (intersection (sites Top) (sites Left)))) "Sowing")) (phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(and (< 0 (count at:(from))) (= 0 (state at:(from))))) (then (sow "TrackCCW" apply:(if (and (= 0 (state at:(to))) (= 4 (count at:(to)))) (set State at:(to) (mover)) (if (< 1 (count at:(to))) (if (= 0 (state at:(to))) (and (moveAgain) (set Var "Replay" (to))) (if (!= (mover) (state at:(to))) (and (fromTo (from (to)) (to (handSite Mover)) count:(min 2 (count at:(to)))) (set State at:(to) (state at:(to)))))))))))} (then (if (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) (and {(forEach Site (forEach (sites Board) if:(= 1 (state at:(site)))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (forEach (sites Board) if:(= 2 (state at:(site)))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (set Var "Round" (+ 1 (var "Round")))}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (>= 1 (count Cell at:(handSite P1))) (result P2 Win)) (if (>= 1 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:4 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 4 (count Cell at:(handSite Mover))) (moveAgain) (if (= 3 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:3) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}) (if (= 2 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (if (< 50 (value Random (range 1 100))) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}))))}))) (then (if (and (is Empty (handSite P1)) (is Empty (handSite P2))) (and (if (is Even (var "Round")) (set NextPlayer (player 2)) (set NextPlayer (player 1))) (set Pending)))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Opening"))})) | ###Description
2x6 board. Four counters in each hole. The game begins with a stylised move. One player takes one counter from their rightmost hole, and holds in in their hand. They then take one counter from the next hole, moving in an anti-clockwise direction, and place it in the next hole. They then take a counter from the next hole after that, and placing it in the next hole, continuing until there is an alternating pattern of a hole with five counters followed by a hole with three counters. The original hole from which the first counter was taken will have four counters. The player will then place the first counter taken into the next hole in the opponent's row, causing it to hold four counters. This creates a weg, a hole captured by that player, which is involved in capturing (see below). Players alternate making this first move in subsequent rounds. The next phase begins once this stylised move is completed. Sowing occurs in an anti-clockwise direction. If the final counter of a sowing falls into a hole containing counters, these are picked up and sowing continues. A player's turn ends when the final counter falls into an empty hole. When the final counter of a sowing falls into a hole containing three counters, it creates a weg, and the turn ends. Players cannot sow from a weg they've captured. A player may capture counters from an opponent's weg when the final counter of a sowing falls into the opponent's weg on the player's turn. The final counter and one counter in the weg are captured. The player may then take the counters from any of their holes and sow from there. If a player cannot play, they must pass their turn, but may play again if this becomes possible in a subsequent turn. Play ends when there are no possible moves left on the board. Players then capture the counters in their wegs. A new round begins. The players fill as many of their holes with four counters as they are able. The player with more counters will capture as many holes from the opponent in which they can place four or more counters. If the player has three remaining counters after holes are filled with four, the opponent would cede their one remaining counter to the opponent to make four and the player captures one further hole. If there are two remaining, the players draw lots to determine which player owns the remaining hole. The player who played second in the previous round begins the new round with the same stylized move, and play continues as before after that. Play continues until one player owns no holes; the opponent wins.
###Ludii
(game "Gabata (Shoa and Adegrat)" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 4 to:(sites Track))}) phases:{(phase "Opening" (play (if (is Mover P1) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(trackSite Move from:(last From) "TrackCCW" steps:2)}) (sites {10}))) (then (sow count:1 "TrackCCW" apply:(if (not (is In (trackSite Move from:(from) "TrackCCW" steps:2) (intersection (sites Bottom) (sites Right)))) (moveAgain) (set State at:11 (mover)))))) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(trackSite Move from:(last From) "TrackCCW" steps:2)}) (sites {1}))) (then (sow count:1 "TrackCCW" apply:(if (not (is In (trackSite Move from:(from) "TrackCCW" steps:2) (intersection (sites Top) (sites Left)))) (moveAgain) (set State at:0 (mover)))))))) (nextPhase (if (is Mover P1) (is In (trackSite Move from:(last From) "TrackCCW" steps:2) (intersection (sites Bottom) (sites Right))) (is In (trackSite Move from:(last From) "TrackCCW" steps:2) (intersection (sites Top) (sites Left)))) "Sowing")) (phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(and (< 0 (count at:(from))) (= 0 (state at:(from))))) (then (sow "TrackCCW" apply:(if (and (= 0 (state at:(to))) (= 4 (count at:(to)))) (set State at:(to) (mover)) (if (< 1 (count at:(to))) (if (= 0 (state at:(to))) (and (moveAgain) (set Var "Replay" (to))) (if (!= (mover) (state at:(to))) (and (fromTo (from (to)) (to (handSite Mover)) count:(min 2 (count at:(to)))) (set State at:(to) (state at:(to)))))))))))} (then (if (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) (and {(forEach Site (forEach (sites Board) if:(= 1 (state at:(site)))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (forEach (sites Board) if:(= 2 (state at:(site)))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (set Var "Round" (+ 1 (var "Round")))}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (>= 1 (count Cell at:(handSite P1))) (result P2 Win)) (if (>= 1 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:4 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 4 (count Cell at:(handSite Mover))) (moveAgain) (if (= 3 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:3) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}) (if (= 2 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (if (< 50 (value Random (range 1 100))) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}))))}))) (then (if (and (is Empty (handSite P1)) (is Empty (handSite P2))) (and (if (is Even (var "Round")) (set NextPlayer (player 2)) (set NextPlayer (player 1))) (set Pending)))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Opening"))})) |
2x6 board. Three counters in each hole. Play begins with a stylized move. One player takes all of the counters from their leftmost hole, and proceeding in an anti-clockwise direction, takes all of the counters from the holes in their row. They then begin sowing these counters into the opponent's row, proceeding around the board in an anti-clockwise direction. When the final counter lands in an occupied hole, these counters are picked up and sowing continues. When the final counter lands in an empty hole, the turn ends. The main phase of the game begins, in which sowing continues in the same manner, but the player may begin their turn from any hole in their row. At the end of sowing, any holes containing four counters are captured by the owner of the row in which the hole is located, unless it is the hole in which the final counter fell, in which case the player captures them and the turn ends. If at the end of the game there are not sufficient counters to cause a hole to contain four, the players decide how the counters are allocated, and a new round begins. The players fill as many of their holes with four counters as they are able. The player with more counters will capture as many holes from the opponent in which they can place three or counters. If the player has two remaining counters after holes are filled with three, the opponent would cede their one remaining counter to the player to make three and the player captures one further hole. The player who played second in the previous round begins the new round with the same stylized move, and play continues as before after that. Play continues until one player owns no holes; the opponent wins. | (game "Gabata (Wuqro)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "LeftMost" {(pair P1 0) (pair P2 11)})}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 3 to:(sites Track))}) phases:{(phase "Opening" (play (if (is Prev Mover) (move Select (from (var "Replay")) (then (sow apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))) (set Var "Round" (+ 1 (var "Round"))))))) (move (from 0) (to 11) count:(count at:(to)) (then (and {(forEach Site (sites Mover) (if (is Occupied (site)) (fromTo (from (site)) (to 11) count:(count at:(site))))) (moveAgain) (set Var "Replay" 11)}))))) (nextPhase (not (is Next Mover)) "Sowing")) (phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow apply:(if (< 1 (count at:(to))) (if (= 4 (count at:(to))) (fromTo (from (to)) (to (handSite Mover)) count:4) (and (moveAgain) (set Var "Replay" (to)))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(- (var "NumSowed") 1))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (handSite Mover)) count:4))) (set Var "NumSowed" 0))))))} (then (if (= 4 (count in:(sites Board))) (and {(forEach Site (sites Board) (fromTo (from (site)) (to (handSite Mover)) count:(count at:(site)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (set Var "Round" (+ 1 (var "Round")))}) (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (and {(forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (set Var "Round" (+ 1 (var "Round")))})))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 2 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 2 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 3 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:3 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 3 (count Cell at:(handSite Mover))) (moveAgain) (if (= 2 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:2) (fromTo (from (handSite Next)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))))})))}))) (then (if (and (is Empty (handSite P1)) (is Empty (handSite P2))) (and (if (is Even (var "Round")) (set NextPlayer (player 2)) (set NextPlayer (player 1))) (set Pending)))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Opening"))})) | ###Description
2x6 board. Three counters in each hole. Play begins with a stylized move. One player takes all of the counters from their leftmost hole, and proceeding in an anti-clockwise direction, takes all of the counters from the holes in their row. They then begin sowing these counters into the opponent's row, proceeding around the board in an anti-clockwise direction. When the final counter lands in an occupied hole, these counters are picked up and sowing continues. When the final counter lands in an empty hole, the turn ends. The main phase of the game begins, in which sowing continues in the same manner, but the player may begin their turn from any hole in their row. At the end of sowing, any holes containing four counters are captured by the owner of the row in which the hole is located, unless it is the hole in which the final counter fell, in which case the player captures them and the turn ends. If at the end of the game there are not sufficient counters to cause a hole to contain four, the players decide how the counters are allocated, and a new round begins. The players fill as many of their holes with four counters as they are able. The player with more counters will capture as many holes from the opponent in which they can place three or counters. If the player has two remaining counters after holes are filled with three, the opponent would cede their one remaining counter to the player to make three and the player captures one further hole. The player who played second in the previous round begins the new round with the same stylized move, and play continues as before after that. Play continues until one player owns no holes; the opponent wins.
###Ludii
(game "Gabata (Wuqro)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "LeftMost" {(pair P1 0) (pair P2 11)})}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 3 to:(sites Track))}) phases:{(phase "Opening" (play (if (is Prev Mover) (move Select (from (var "Replay")) (then (sow apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))) (set Var "Round" (+ 1 (var "Round"))))))) (move (from 0) (to 11) count:(count at:(to)) (then (and {(forEach Site (sites Mover) (if (is Occupied (site)) (fromTo (from (site)) (to 11) count:(count at:(site))))) (moveAgain) (set Var "Replay" 11)}))))) (nextPhase (not (is Next Mover)) "Sowing")) (phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow apply:(if (< 1 (count at:(to))) (if (= 4 (count at:(to))) (fromTo (from (to)) (to (handSite Mover)) count:4) (and (moveAgain) (set Var "Replay" (to)))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(- (var "NumSowed") 1))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (handSite Mover)) count:4))) (set Var "NumSowed" 0))))))} (then (if (= 4 (count in:(sites Board))) (and {(forEach Site (sites Board) (fromTo (from (site)) (to (handSite Mover)) count:(count at:(site)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (set Var "Round" (+ 1 (var "Round")))}) (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (and {(forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (set Var "Round" (+ 1 (var "Round")))})))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 2 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 2 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 3 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:3 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 3 (count Cell at:(handSite Mover))) (moveAgain) (if (= 2 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:2) (fromTo (from (handSite Next)) (to (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "Track" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))))})))}))) (then (if (and (is Empty (handSite P1)) (is Empty (handSite P2))) (and (if (is Even (var "Round")) (set NextPlayer (player 2)) (set NextPlayer (player 1))) (set Pending)))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Opening"))})) |
2x6 board with two stores. Seven counters in each hole. Play moves in an anti-clockwise direction and players sow into the store on their right hand side. A move may begin from any of the player's holes except their store. If the last counter falls into the store, they can sow again from any of the holes in their row. If it lands in a hole with counters in it, these are picked up and sowing continues. If the last counter falls into an empty hole the move ends, but if the hole is in the player's own row, any counters in the hole opposite it are captured and placed in the store. When no more moves can be made, a new round begins and each player fills as many holes as they can by putting seven in each. Surplus counters are placed in the store. Any unfilled holes are excluded from play. Play continues until one player cannot fill a hole with seven counters, and the opponent wins. | (game "Galatjang" (players 2) (equipment {(mancalaBoard 2 6 {(track "Track1" "1,E,ENE,WNW,W" loop:True P1) (track "Track2" "12,W,WSW,ESE,E" loop:True P2)}) (piece "Seed" Shared) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (map {(pair P1 LastSite) (pair P2 FirstSite)})}) (rules (start {(set Count 7 to:(union (sites Bottom) (sites Top))) (forEach Value min:1 max:12 (set RememberValue (value)))}) phases:{(phase "Round" (play (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(last To afterConsequence:True)}) (forEach (sites Mover "Home") if:(is In (site) (values Remembered)))) if:(> (count at:(from)) 0)) (then (sow "Track" owner:(mover) apply:(if (= (to) (mapEntry Mover)) (and (moveAgain) (set Pending)) (if (> (count at:(to)) 1) (moveAgain) (if (and (is In (to) (sites Mover "Home")) (> (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))) 0)) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (mapEntry Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))))) (then (if (all Sites (forEach (difference (union (sites Bottom) (sites Top)) (sites Empty)) if:(is In (site) (values Remembered))) if:(= 0 (count at:(site)))) (and (forEach Site (difference (sites P1 "Home") (sites Empty)) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site)))) (forEach Site (difference (sites P2 "Home") (sites Empty)) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))))))))) (nextPhase (all Sites (forEach (difference (union (sites Bottom) (sites Top)) (sites Empty)) if:(is In (site) (values Remembered))) if:(= 0 (count at:(site)))) "BetweenRound")) (phase "BetweenRound" (play (if (>= (count at:(mapEntry Mover)) 7) (move (from (mapEntry Mover)) (to (intersection (sites Empty) (sites Mover "Home"))) count:7) (then (if (or (and (> 7 (count at:(mapEntry P2))) (= 42 (count in:(sites Bottom)))) (and (> 7 (count at:(mapEntry P1))) (= 42 (count in:(sites Top))))) (and (forget Value All) (forEach Site (sites Board) (if (= 7 (count at:(site))) (remember Value (site))))))))) (nextPhase (or (and (> 7 (count at:(mapEntry P2))) (= 42 (count in:(sites Bottom)))) (and (> 7 (count at:(mapEntry P1))) (= 42 (count in:(sites Top))))) "Round"))} (end (if (> 7 (count in:(difference (sites Board) (mapEntry Mover)))) (result Mover Win))))) | ###Description
2x6 board with two stores. Seven counters in each hole. Play moves in an anti-clockwise direction and players sow into the store on their right hand side. A move may begin from any of the player's holes except their store. If the last counter falls into the store, they can sow again from any of the holes in their row. If it lands in a hole with counters in it, these are picked up and sowing continues. If the last counter falls into an empty hole the move ends, but if the hole is in the player's own row, any counters in the hole opposite it are captured and placed in the store. When no more moves can be made, a new round begins and each player fills as many holes as they can by putting seven in each. Surplus counters are placed in the store. Any unfilled holes are excluded from play. Play continues until one player cannot fill a hole with seven counters, and the opponent wins.
###Ludii
(game "Galatjang" (players 2) (equipment {(mancalaBoard 2 6 {(track "Track1" "1,E,ENE,WNW,W" loop:True P1) (track "Track2" "12,W,WSW,ESE,E" loop:True P2)}) (piece "Seed" Shared) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (map {(pair P1 LastSite) (pair P2 FirstSite)})}) (rules (start {(set Count 7 to:(union (sites Bottom) (sites Top))) (forEach Value min:1 max:12 (set RememberValue (value)))}) phases:{(phase "Round" (play (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(last To afterConsequence:True)}) (forEach (sites Mover "Home") if:(is In (site) (values Remembered)))) if:(> (count at:(from)) 0)) (then (sow "Track" owner:(mover) apply:(if (= (to) (mapEntry Mover)) (and (moveAgain) (set Pending)) (if (> (count at:(to)) 1) (moveAgain) (if (and (is In (to) (sites Mover "Home")) (> (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))) 0)) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (mapEntry Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))))) (then (if (all Sites (forEach (difference (union (sites Bottom) (sites Top)) (sites Empty)) if:(is In (site) (values Remembered))) if:(= 0 (count at:(site)))) (and (forEach Site (difference (sites P1 "Home") (sites Empty)) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site)))) (forEach Site (difference (sites P2 "Home") (sites Empty)) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))))))))) (nextPhase (all Sites (forEach (difference (union (sites Bottom) (sites Top)) (sites Empty)) if:(is In (site) (values Remembered))) if:(= 0 (count at:(site)))) "BetweenRound")) (phase "BetweenRound" (play (if (>= (count at:(mapEntry Mover)) 7) (move (from (mapEntry Mover)) (to (intersection (sites Empty) (sites Mover "Home"))) count:7) (then (if (or (and (> 7 (count at:(mapEntry P2))) (= 42 (count in:(sites Bottom)))) (and (> 7 (count at:(mapEntry P1))) (= 42 (count in:(sites Top))))) (and (forget Value All) (forEach Site (sites Board) (if (= 7 (count at:(site))) (remember Value (site))))))))) (nextPhase (or (and (> 7 (count at:(mapEntry P2))) (= 42 (count in:(sites Bottom)))) (and (> 7 (count at:(mapEntry P1))) (= 42 (count in:(sites Top))))) "Round"))} (end (if (> 7 (count in:(difference (sites Board) (mapEntry Mover)))) (result Mover Win))))) |
2x6 board. Four counters in each hole. Sowing occurs in an anti-clockwise direction. When the final counter of a sowing lands in an empty hole on the player's own row, the contents of the opponent's opposite hole are captured only if it contains one counter. If the final counter lands in an occupied hole, the contents of it are picked up and sowing continues. If the final counter lands in a hole in the opponent's row, causing it to contain four counters, the hole becomes a qasamo, and it can no longer be sown from. Play continues until all of the counters are captured or are in a qasamo. The player with the most counters captured and in all qasamo belonging to them wins. | (game "Gamacha (Nobility)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(and (< 0 (count at:(from))) (= 0 (state at:(from))))) (then (sow apply:(if (and (is In (to) (sites Mover)) (= 1 (count at:(to)))) (if (= 1 (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6)))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:1)) (if (< 1 (count at:(to))) (and (moveAgain) (if (and {(is In (to) (sites Next)) (= 0 (state at:(to))) (= 4 (count at:(to)))}) (set State at:(to) (mover)))))))))) (end (if (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(forEach (sites Board) if:(= (id P1) (state at:(site))))))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(forEach (sites Board) if:(= (id P2) (state at:(site)))))))}))))) | ###Description
2x6 board. Four counters in each hole. Sowing occurs in an anti-clockwise direction. When the final counter of a sowing lands in an empty hole on the player's own row, the contents of the opponent's opposite hole are captured only if it contains one counter. If the final counter lands in an occupied hole, the contents of it are picked up and sowing continues. If the final counter lands in a hole in the opponent's row, causing it to contain four counters, the hole becomes a qasamo, and it can no longer be sown from. Play continues until all of the counters are captured or are in a qasamo. The player with the most counters captured and in all qasamo belonging to them wins.
###Ludii
(game "Gamacha (Nobility)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(and (< 0 (count at:(from))) (= 0 (state at:(from))))) (then (sow apply:(if (and (is In (to) (sites Mover)) (= 1 (count at:(to)))) (if (= 1 (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6)))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:1)) (if (< 1 (count at:(to))) (and (moveAgain) (if (and {(is In (to) (sites Next)) (= 0 (state at:(to))) (= 4 (count at:(to)))}) (set State at:(to) (mover)))))))))) (end (if (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(forEach (sites Board) if:(= (id P1) (state at:(site))))))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(forEach (sites Board) if:(= (id P2) (state at:(site)))))))}))))) |
2x12 board. The board begins with the following pattern of counters in the holes, beginning from the bottom left row and proceeding in an anti-clockwise direction: 0-0-4-0-4-0-4-0-4-0-4-0-4-0-4-0-4-0-4-0-4-0-4-0. One player starts with an additional four counters in their left hand hole. The player with fewer counters on their first move places the counters from their seventh hole into the opponent's opposite hole. Sowing occurs in an anti-clockwise direction, and may only happen when the final counter lands either in an empty hole in the player's own row or in any hole in the opponent's row. When the final counter lands in an empty hole in the player's own row, the contents of the opposite hole in the opponent's row are captured. When the final counter lands in an occupied hole in the opponent's row, these counters are picked up and sowing continues. The final counter of this sowing is allowed to fall into an occupied hole in the player's own row, and these are picked up and sowing continues. Sowing ends when the final counter lands in an empty hole. The game ends when one player has no counters on their side of the board, and the opponent wins. | (game "Gamacha" (players 2) (equipment {(mancalaBoard 2 12 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 4 to:(sites {"C1" "E1" "G1" "I1" "K1" "L2" "J2" "H2" "F2" "D2" "B2"}))) phases:{(phase "Opening" (play (move (from 6) (to 18) count:4)) (nextPhase "Sowing")) (phase "Sowing" (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(if (is Prev Mover) True (and (> (count at:(from)) 0) (if (is In (trackSite Move from:(from) steps:(count at:(from))) (sites Next)) True (is Empty (trackSite Move from:(from) steps:(count at:(from)))))))) (then (sow apply:(if (and (is In (to) (sites Mover)) (<= (count at:(to)) 1)) (if (!= 0 (count at:(if (is Mover P1) (+ (to) 12) (- (to) 12)))) (fromTo (from (if (is Mover P1) (+ (to) 12) (- (to) 12))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 12) (- (to) 12))))) (if (> (count at:(to)) 1) (moveAgain))))))))} (end (forEach Player if:(all Sites (sites Player) if:(= 0 (count at:(site)))) (result Player Loss))))) | ###Description
2x12 board. The board begins with the following pattern of counters in the holes, beginning from the bottom left row and proceeding in an anti-clockwise direction: 0-0-4-0-4-0-4-0-4-0-4-0-4-0-4-0-4-0-4-0-4-0-4-0. One player starts with an additional four counters in their left hand hole. The player with fewer counters on their first move places the counters from their seventh hole into the opponent's opposite hole. Sowing occurs in an anti-clockwise direction, and may only happen when the final counter lands either in an empty hole in the player's own row or in any hole in the opponent's row. When the final counter lands in an empty hole in the player's own row, the contents of the opposite hole in the opponent's row are captured. When the final counter lands in an occupied hole in the opponent's row, these counters are picked up and sowing continues. The final counter of this sowing is allowed to fall into an occupied hole in the player's own row, and these are picked up and sowing continues. Sowing ends when the final counter lands in an empty hole. The game ends when one player has no counters on their side of the board, and the opponent wins.
###Ludii
(game "Gamacha" (players 2) (equipment {(mancalaBoard 2 12 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 4 to:(sites {"C1" "E1" "G1" "I1" "K1" "L2" "J2" "H2" "F2" "D2" "B2"}))) phases:{(phase "Opening" (play (move (from 6) (to 18) count:4)) (nextPhase "Sowing")) (phase "Sowing" (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(if (is Prev Mover) True (and (> (count at:(from)) 0) (if (is In (trackSite Move from:(from) steps:(count at:(from))) (sites Next)) True (is Empty (trackSite Move from:(from) steps:(count at:(from)))))))) (then (sow apply:(if (and (is In (to) (sites Mover)) (<= (count at:(to)) 1)) (if (!= 0 (count at:(if (is Mover P1) (+ (to) 12) (- (to) 12)))) (fromTo (from (if (is Mover P1) (+ (to) 12) (- (to) 12))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 12) (- (to) 12))))) (if (> (count at:(to)) 1) (moveAgain))))))))} (end (forEach Player if:(all Sites (sites Player) if:(= 0 (count at:(site)))) (result Player Loss))))) |
2x4 board with two stores on the ends. Six counters in each hole. Instead of owning the row of holes closest to them, players own the holes on the left half of the board. Play begins from any of the player's holes, sowing in either direction. When the last counter is sown, making the hole contain two or four counters, these are captured. If the adjacent holes also contain two or four counters, these are also captured. If the last counter falls into a hole, making it contain a number other than two or four, and adjacent holes contain two or four, the counters from only one of these adjacent holes may be captured. Play ends when each player is reduced to one counter. A second round begins with each player placing six counters in as many of their holes as they can, returning surplus to the store. Play continues as before. Rounds are played until one player loses all their counters. | (game "Gifia" (players 2) (equipment {(mancalaBoard 2 4 {(track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "4,W,N,E" loop:True)}) (regions P1 (difference (expand (sites Left) steps:2) (sites Left))) (regions P2 (difference (expand (sites Right) steps:2) (sites Right))) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 6 to:(sites Track))) phases:{(phase "Sowing" (play (if (is Prev Mover) (or (move (from (ahead (last To afterConsequence:True) W)) (to (mapEntry Mover)) count:(count at:(ahead (last To afterConsequence:True) W))) (move (from (ahead (last To afterConsequence:True) E)) (to (mapEntry Mover)) count:(count at:(ahead (last To afterConsequence:True) E)))) (or (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow "TrackCCW" apply:(if (or (= 2 (count at:(to))) (= 4 (count at:(to)))) (and {(fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to))) (if (!= (to) (ahead (to) W)) (if (or (= 2 (count at:(ahead (to) W))) (= 4 (count at:(ahead (to) W)))) (fromTo (from (ahead (to) W)) (to (mapEntry Mover)) count:(count at:(ahead (to) W))))) (if (!= (to) (ahead (to) E)) (if (or (= 2 (count at:(ahead (to) E))) (= 4 (count at:(ahead (to) E)))) (fromTo (from (ahead (to) E)) (to (mapEntry Mover)) count:(count at:(ahead (to) E)))))}) (if (and (if (!= (to) (ahead (to) W)) (if (or (= 2 (count at:(ahead (to) W))) (= 4 (count at:(ahead (to) W)))) False)) (if (!= (to) (ahead (to) E)) (if (or (= 2 (count at:(ahead (to) E))) (= 4 (count at:(ahead (to) E)))) False))) (moveAgain)))))) (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow "TrackCW" apply:(if (or (= 2 (count at:(to))) (= 4 (count at:(to)))) (and {(fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to))) (if (!= (to) (ahead (to) W)) (if (or (= 2 (count at:(ahead (to) W))) (= 4 (count at:(ahead (to) W)))) (fromTo (from (ahead (to) W)) (to (mapEntry Mover)) count:(count at:(ahead (to) W))))) (if (!= (to) (ahead (to) E)) (if (or (= 2 (count at:(ahead (to) E))) (= 4 (count at:(ahead (to) E)))) (fromTo (from (ahead (to) E)) (to (mapEntry Mover)) count:(count at:(ahead (to) E)))))}) (if (and (if (!= (to) (ahead (to) W)) (if (or (= 2 (count at:(ahead (to) W))) (= 4 (count at:(ahead (to) W)))) False)) (if (!= (to) (ahead (to) E)) (if (or (= 2 (count at:(ahead (to) E))) (= 4 (count at:(ahead (to) E)))) False))) (moveAgain))))))) (then (if (and (>= 1 (count Pieces All in:(sites P1))) (>= 1 (count Pieces All in:(sites P2)))) (and (forEach Site (sites P1) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))))))) (end (if (no Pieces All in:(union (sites Top) (sites Bottom))) {(if (> 6 (count at:(mapEntry P1))) (result P2 Win)) (if (> 6 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (no Pieces All in:(union (sites Top) (sites Bottom))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 6 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (sites Mover) if:(is Empty (to))) count:6)))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x4 board with two stores on the ends. Six counters in each hole. Instead of owning the row of holes closest to them, players own the holes on the left half of the board. Play begins from any of the player's holes, sowing in either direction. When the last counter is sown, making the hole contain two or four counters, these are captured. If the adjacent holes also contain two or four counters, these are also captured. If the last counter falls into a hole, making it contain a number other than two or four, and adjacent holes contain two or four, the counters from only one of these adjacent holes may be captured. Play ends when each player is reduced to one counter. A second round begins with each player placing six counters in as many of their holes as they can, returning surplus to the store. Play continues as before. Rounds are played until one player loses all their counters.
###Ludii
(game "Gifia" (players 2) (equipment {(mancalaBoard 2 4 {(track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "4,W,N,E" loop:True)}) (regions P1 (difference (expand (sites Left) steps:2) (sites Left))) (regions P2 (difference (expand (sites Right) steps:2) (sites Right))) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 6 to:(sites Track))) phases:{(phase "Sowing" (play (if (is Prev Mover) (or (move (from (ahead (last To afterConsequence:True) W)) (to (mapEntry Mover)) count:(count at:(ahead (last To afterConsequence:True) W))) (move (from (ahead (last To afterConsequence:True) E)) (to (mapEntry Mover)) count:(count at:(ahead (last To afterConsequence:True) E)))) (or (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow "TrackCCW" apply:(if (or (= 2 (count at:(to))) (= 4 (count at:(to)))) (and {(fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to))) (if (!= (to) (ahead (to) W)) (if (or (= 2 (count at:(ahead (to) W))) (= 4 (count at:(ahead (to) W)))) (fromTo (from (ahead (to) W)) (to (mapEntry Mover)) count:(count at:(ahead (to) W))))) (if (!= (to) (ahead (to) E)) (if (or (= 2 (count at:(ahead (to) E))) (= 4 (count at:(ahead (to) E)))) (fromTo (from (ahead (to) E)) (to (mapEntry Mover)) count:(count at:(ahead (to) E)))))}) (if (and (if (!= (to) (ahead (to) W)) (if (or (= 2 (count at:(ahead (to) W))) (= 4 (count at:(ahead (to) W)))) False)) (if (!= (to) (ahead (to) E)) (if (or (= 2 (count at:(ahead (to) E))) (= 4 (count at:(ahead (to) E)))) False))) (moveAgain)))))) (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow "TrackCW" apply:(if (or (= 2 (count at:(to))) (= 4 (count at:(to)))) (and {(fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to))) (if (!= (to) (ahead (to) W)) (if (or (= 2 (count at:(ahead (to) W))) (= 4 (count at:(ahead (to) W)))) (fromTo (from (ahead (to) W)) (to (mapEntry Mover)) count:(count at:(ahead (to) W))))) (if (!= (to) (ahead (to) E)) (if (or (= 2 (count at:(ahead (to) E))) (= 4 (count at:(ahead (to) E)))) (fromTo (from (ahead (to) E)) (to (mapEntry Mover)) count:(count at:(ahead (to) E)))))}) (if (and (if (!= (to) (ahead (to) W)) (if (or (= 2 (count at:(ahead (to) W))) (= 4 (count at:(ahead (to) W)))) False)) (if (!= (to) (ahead (to) E)) (if (or (= 2 (count at:(ahead (to) E))) (= 4 (count at:(ahead (to) E)))) False))) (moveAgain))))))) (then (if (and (>= 1 (count Pieces All in:(sites P1))) (>= 1 (count Pieces All in:(sites P2)))) (and (forEach Site (sites P1) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))))))) (end (if (no Pieces All in:(union (sites Top) (sites Bottom))) {(if (> 6 (count at:(mapEntry P1))) (result P2 Win)) (if (> 6 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (no Pieces All in:(union (sites Top) (sites Bottom))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 6 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (sites Mover) if:(is Empty (to))) count:6)))) (nextPhase (all Passed) "Sowing"))})) |
Play begins with six counters in each hole. Sowing is anti-clockwise. If the last counter of a sowing lands in the player's own hole making it even, the counters are captured. If the contents of the hole before it is also even, these are also taken, continuing until an odd or empty hole is reached. If the last counter makes a hole odd, the turn ends. If a player has no counters in their holes at the end of the turn, the opponent must play so that the player can play on the next turn. Play ends when neither player is able to move; the last player who was able to move takes the remaining counters and the player with the most counters captured wins. | (game "Halusa" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 6 to:(sites Track))) (play (do (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow if:(and (is In (to) (sites Mover)) (is Even (count at:(to)))) apply:(fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) backtracking:True))) ifAfterwards:(> (count in:(sites Next)) 0))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) | ###Description
Play begins with six counters in each hole. Sowing is anti-clockwise. If the last counter of a sowing lands in the player's own hole making it even, the counters are captured. If the contents of the hole before it is also even, these are also taken, continuing until an odd or empty hole is reached. If the last counter makes a hole odd, the turn ends. If a player has no counters in their holes at the end of the turn, the opponent must play so that the player can play on the next turn. Play ends when neither player is able to move; the last player who was able to move takes the remaining counters and the player with the most counters captured wins.
###Ludii
(game "Halusa" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 6 to:(sites Track))) (play (do (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow if:(and (is In (to) (sites Mover)) (is Even (count at:(to)))) apply:(fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) backtracking:True))) ifAfterwards:(> (count in:(sites Next)) 0))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) |
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. Each player has 6 holes. | (game "Hoyito" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (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 (if (no Moves Mover) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) | ###Description
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. Each player has 6 holes.
###Ludii
(game "Hoyito" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (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 (if (no Moves Mover) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) |
2x6 board. Four counters in each hole. Sowing proceeds in an anti-clockwise direction. When the final counter of a sowing lands in an occupied hole, the contents are picked up and sowing continues. When the final counter falls in an empty hole, the turn ends. If the empty hole is in the player's row, any counters in the opponent's opposite hole are captured. If a player cannot play, they pass their turn until they are able. The player who captures all of the counters wins. Players then count their pieces by placing four in each hole, and the player who has more than their original number takes ownership of one of the opponent's holes for every four counters more than the original number that have been taken. If no player took four more than the original, the player with three extra gets the hole, if each player has two extra they draw lots to see who gets an extra hole. Play then begins again as before. Play continues until one player owns all of the holes. | (game "Hufesay" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (piece "Seed" Shared) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 11)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (sow apply:(if (> (count at:(to)) 1) (moveAgain) (if (and (is In (to) (sites Mover)) (> (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))) 0)) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6)))))))))} (then (if (or (all Sites (sites P1) if:(= 0 (count at:(site)))) (all Sites (sites P2) if:(= 0 (count at:(site))))) (and {(forEach Site (sites (values Remembered "OwnedP1")) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites (values Remembered "OwnedP2")) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (if (>= (+ (count Cell at:(handSite P1)) (count in:(sites P1))) (+ (count Cell at:(handSite P2)) (count in:(sites P2)))) (set NextPlayer (player 1)) (set NextPlayer (player 2)))}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 4 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 4 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:4 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 4 (count Cell at:(handSite Mover))) (moveAgain) (if (= 3 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:3) (fromTo (from (handSite Next)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))))}) (fromTo (from (handSite Mover)) (to (handSite Next)) count:(count Cell at:(handSite Mover)))))}))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) | ###Description
2x6 board. Four counters in each hole. Sowing proceeds in an anti-clockwise direction. When the final counter of a sowing lands in an occupied hole, the contents are picked up and sowing continues. When the final counter falls in an empty hole, the turn ends. If the empty hole is in the player's row, any counters in the opponent's opposite hole are captured. If a player cannot play, they pass their turn until they are able. The player who captures all of the counters wins. Players then count their pieces by placing four in each hole, and the player who has more than their original number takes ownership of one of the opponent's holes for every four counters more than the original number that have been taken. If no player took four more than the original, the player with three extra gets the hole, if each player has two extra they draw lots to see who gets an extra hole. Play then begins again as before. Play continues until one player owns all of the holes.
###Ludii
(game "Hufesay" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (piece "Seed" Shared) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 11)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (sow apply:(if (> (count at:(to)) 1) (moveAgain) (if (and (is In (to) (sites Mover)) (> (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))) 0)) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6)))))))))} (then (if (or (all Sites (sites P1) if:(= 0 (count at:(site)))) (all Sites (sites P2) if:(= 0 (count at:(site))))) (and {(forEach Site (sites (values Remembered "OwnedP1")) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites (values Remembered "OwnedP2")) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (if (>= (+ (count Cell at:(handSite P1)) (count in:(sites P1))) (+ (count Cell at:(handSite P2)) (count in:(sites P2)))) (set NextPlayer (player 1)) (set NextPlayer (player 2)))}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 4 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 4 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:4 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 4 (count Cell at:(handSite Mover))) (moveAgain) (if (= 3 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:3) (fromTo (from (handSite Next)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))))}) (fromTo (from (handSite Mover)) (to (handSite Next)) count:(count Cell at:(handSite Mover)))))}))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) |
2x5 board, the right-most hole is the store. Four counters in each hole. Sowing in an anti-clockwise direction, including the store. Play begins by each player placing the counters in their fourth hole into their store. Moves may begin from any of a player's holes except the store. If the last counter of a sowing drops into a hole making it contain two or three counters, these are taken and placed in the store. As soon as a player has at least thirteen counters in their store, they are picked up and sown, omitting each player's store and takes any counters in the opponent's holes which now contain two or three counters. Each player performs this move only once. The player who captures the most counters wins. | (game "I Pere" (players 2) (equipment {(mancalaBoard 2 5 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 4) (pair P2 5)}) (map "Fourth" {(pair P1 3) (pair P2 6)})}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Opening" (play (move (from (mapEntry "Fourth" Mover)) (to (mapEntry Mover)) count:4)) (nextPhase Mover "Sowing")) (phase "Sowing" (play (if (and (<= 13 (count at:(mapEntry Mover))) (!= 1 (value Player Mover))) (or {(move Select (from (mapEntry Mover)) (then (and (sow skipIf:(or (= (to) (mapEntry P1)) (= (to) (mapEntry P2)))) (set Value Mover 1))))} (then (forEach Site (difference (sites Next) (mapEntry Next)) (if (or (= 2 (count at:(site))) (= 3 (count at:(site)))) (fromTo (from (site)) (to (mapEntry Mover)) count:(count at:(site))))))) (move Select (from (difference (sites Mover) (mapEntry Mover)) if:(is Occupied (from))) (then (sow apply:(if (or (= 2 (count at:(to))) (= 3 (count at:(to)))) (fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to))))))))))} (end (if (no Moves Next) (byScore {(score P1 (count at:(mapEntry P1))) (score P2 (count at:(mapEntry P2)))}))))) | ###Description
2x5 board, the right-most hole is the store. Four counters in each hole. Sowing in an anti-clockwise direction, including the store. Play begins by each player placing the counters in their fourth hole into their store. Moves may begin from any of a player's holes except the store. If the last counter of a sowing drops into a hole making it contain two or three counters, these are taken and placed in the store. As soon as a player has at least thirteen counters in their store, they are picked up and sown, omitting each player's store and takes any counters in the opponent's holes which now contain two or three counters. Each player performs this move only once. The player who captures the most counters wins.
###Ludii
(game "I Pere" (players 2) (equipment {(mancalaBoard 2 5 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 4) (pair P2 5)}) (map "Fourth" {(pair P1 3) (pair P2 6)})}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Opening" (play (move (from (mapEntry "Fourth" Mover)) (to (mapEntry Mover)) count:4)) (nextPhase Mover "Sowing")) (phase "Sowing" (play (if (and (<= 13 (count at:(mapEntry Mover))) (!= 1 (value Player Mover))) (or {(move Select (from (mapEntry Mover)) (then (and (sow skipIf:(or (= (to) (mapEntry P1)) (= (to) (mapEntry P2)))) (set Value Mover 1))))} (then (forEach Site (difference (sites Next) (mapEntry Next)) (if (or (= 2 (count at:(site))) (= 3 (count at:(site)))) (fromTo (from (site)) (to (mapEntry Mover)) count:(count at:(site))))))) (move Select (from (difference (sites Mover) (mapEntry Mover)) if:(is Occupied (from))) (then (sow apply:(if (or (= 2 (count at:(to))) (= 3 (count at:(to)))) (fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to))))))))))} (end (if (no Moves Next) (byScore {(score P1 (count at:(mapEntry P1))) (score P2 (count at:(mapEntry P2)))}))))) |
2x3-7 board. Four counters in each hole. Players sow counters from their side of the board in an anti-clockwise direction. When the final counter of a sowing lands in a hole containing one or two counters, making it now contain two or three, these are captured. Any adjacent holes with two or three counters are also captured. Single counters cannot be sown. When a player only has single counters in holes in their row, they pass. The player who captures the most counters wins. Each row has 3 holes. | (game "I" (players 2) (equipment {(mancalaBoard 2 3 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 1)) (then (sow apply:(if (or (= 2 (count at:(to))) (= 3 (count at:(to)))) (and {(fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) (if (!= (to) (ahead (to) E)) (if (or (= 2 (count at:(ahead (to) E))) (= 3 (count at:(ahead (to) E)))) (fromTo (from (ahead (to) E)) (to (handSite Mover)) count:(count at:(ahead (to) E))))) (if (!= (to) (ahead (to) W)) (if (or (= 2 (count at:(ahead (to) W))) (= 3 (count at:(ahead (to) W)))) (fromTo (from (ahead (to) W)) (to (handSite Mover)) count:(count at:(ahead (to) W)))))})))))) (end (if (and (no Moves P1) (no Moves P2)) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) | ###Description
2x3-7 board. Four counters in each hole. Players sow counters from their side of the board in an anti-clockwise direction. When the final counter of a sowing lands in a hole containing one or two counters, making it now contain two or three, these are captured. Any adjacent holes with two or three counters are also captured. Single counters cannot be sown. When a player only has single counters in holes in their row, they pass. The player who captures the most counters wins. Each row has 3 holes.
###Ludii
(game "I" (players 2) (equipment {(mancalaBoard 2 3 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 1)) (then (sow apply:(if (or (= 2 (count at:(to))) (= 3 (count at:(to)))) (and {(fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) (if (!= (to) (ahead (to) E)) (if (or (= 2 (count at:(ahead (to) E))) (= 3 (count at:(ahead (to) E)))) (fromTo (from (ahead (to) E)) (to (handSite Mover)) count:(count at:(ahead (to) E))))) (if (!= (to) (ahead (to) W)) (if (or (= 2 (count at:(ahead (to) W))) (= 3 (count at:(ahead (to) W)))) (fromTo (from (ahead (to) W)) (to (handSite Mover)) count:(count at:(ahead (to) W)))))})))))) (end (if (and (no Moves P1) (no Moves P2)) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) |
2x12 board. Starting position, from the left hand hole, for each player: 0-3-3-0-3-3-0-3-3-0-3-3 In the opening play, one player must sow two counters from the second hole from their right. The opponent then makes the same play from their row, or from the fourth hole from their right. When the final counter lands in an occupied hole, these are picked up and sowing continues. A player's turn ends when the final counter falls into an empty hole. Players may now begin their move from any hole in their row, but only if it ends in an empty hole in their row or if it enters the opponent's row. If the final counter lands in an occupied hole in the opponent's row, these are picked up and sowing continues. If the final counter lands in an occupied hole in the player's row, the contents of the hole in the opponent's hole opposite it are captured. Sowing ends when a capture is made or when a counter falls into an empty hole. | (game "Intotoi" (players 2) (equipment {(mancalaBoard 2 12 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 3 to:(sites {1 2 4 5 7 8 10 11 22 21 19 18 16 15 13 12}))) phases:{(phase "Opening1" (play (move Select (from 10) (then (sow count:2)))) (nextPhase "Opening2")) (phase "Opening2" (play (if (is Prev Mover) (move Select (from (sites {(last To afterConsequence:True)}) if:(> (count at:(from)) 0)) (then (sow apply:(if (!= 1 (count at:(to))) (moveAgain))))) (move Select (from (sites {13 15}) if:(> (count at:(from)) 0)) (then (sow count:2 apply:(if (!= 1 (count at:(to))) (moveAgain))))))) (nextPhase (not (is Next Mover)) "Play")) (phase "Play" (play (move Select (from (sites From (do (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow))) ifAfterwards:(or (and (= 1 (count at:(last To afterConsequence:True))) (is In (last To afterConsequence:True) (sites Mover))) (is In (last To afterConsequence:True) (sites Next))))) if:(> (count at:(from)) 0)) (then (sow apply:(if (= 1 (count at:(to))) (if (and (is Occupied (if (is Mover P1) (+ (to) 12) (- (to) 12))) (is In (to) (sites Mover))) (fromTo (from (if (is Mover P1) (+ (to) 12) (- (to) 12))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 12) (- (to) 12))))) (moveAgain)))))) (nextPhase Mover (is Next Mover) "Replay")) (phase "Replay" (play (move Select (from (sites {(last To afterConsequence:True)}) if:(> (count at:(from)) 0)) (then (sow apply:(if (= 1 (count at:(to))) (if (and (is Occupied (if (is Mover P1) (+ (to) 12) (- (to) 12))) (is In (to) (sites Mover))) (fromTo (from (if (is Mover P1) (+ (to) 12) (- (to) 12))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 12) (- (to) 12))))) (moveAgain)))))) (nextPhase Mover (not (is Next Mover)) "Play"))} (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) | ###Description
2x12 board. Starting position, from the left hand hole, for each player: 0-3-3-0-3-3-0-3-3-0-3-3 In the opening play, one player must sow two counters from the second hole from their right. The opponent then makes the same play from their row, or from the fourth hole from their right. When the final counter lands in an occupied hole, these are picked up and sowing continues. A player's turn ends when the final counter falls into an empty hole. Players may now begin their move from any hole in their row, but only if it ends in an empty hole in their row or if it enters the opponent's row. If the final counter lands in an occupied hole in the opponent's row, these are picked up and sowing continues. If the final counter lands in an occupied hole in the player's row, the contents of the hole in the opponent's hole opposite it are captured. Sowing ends when a capture is made or when a counter falls into an empty hole.
###Ludii
(game "Intotoi" (players 2) (equipment {(mancalaBoard 2 12 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 3 to:(sites {1 2 4 5 7 8 10 11 22 21 19 18 16 15 13 12}))) phases:{(phase "Opening1" (play (move Select (from 10) (then (sow count:2)))) (nextPhase "Opening2")) (phase "Opening2" (play (if (is Prev Mover) (move Select (from (sites {(last To afterConsequence:True)}) if:(> (count at:(from)) 0)) (then (sow apply:(if (!= 1 (count at:(to))) (moveAgain))))) (move Select (from (sites {13 15}) if:(> (count at:(from)) 0)) (then (sow count:2 apply:(if (!= 1 (count at:(to))) (moveAgain))))))) (nextPhase (not (is Next Mover)) "Play")) (phase "Play" (play (move Select (from (sites From (do (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow))) ifAfterwards:(or (and (= 1 (count at:(last To afterConsequence:True))) (is In (last To afterConsequence:True) (sites Mover))) (is In (last To afterConsequence:True) (sites Next))))) if:(> (count at:(from)) 0)) (then (sow apply:(if (= 1 (count at:(to))) (if (and (is Occupied (if (is Mover P1) (+ (to) 12) (- (to) 12))) (is In (to) (sites Mover))) (fromTo (from (if (is Mover P1) (+ (to) 12) (- (to) 12))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 12) (- (to) 12))))) (moveAgain)))))) (nextPhase Mover (is Next Mover) "Replay")) (phase "Replay" (play (move Select (from (sites {(last To afterConsequence:True)}) if:(> (count at:(from)) 0)) (then (sow apply:(if (= 1 (count at:(to))) (if (and (is Occupied (if (is Mover P1) (+ (to) 12) (- (to) 12))) (is In (to) (sites Mover))) (fromTo (from (if (is Mover P1) (+ (to) 12) (- (to) 12))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 12) (- (to) 12))))) (moveAgain)))))) (nextPhase Mover (not (is Next Mover)) "Play"))} (end (if (no Moves Mover) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) |
2x8 board. Four counters in each hole. Play begins with both players placing all of the counters in the rightmost three holes in their row into the rightmost hole. Counters are sown in an anti-clockwise fashion, but they can be sown clockwise only if it leads to a capture. Counters are captured when the final counter is sown into a hole opposite a hole containing one or three counters, and those are take. If the hole opposite the next hole also contains one or three, these are also taken, continuing until a hole with any other number of counters is reached. Instead of taking counters from one of their holes, a player may sow any or all of the counters they have captured, beginning from the leftmost hole. The same rules for sowing apply. The game ends when one player has no counters in their holes. | (game "Iyogh" (players 2) (equipment {(mancalaBoard 2 8 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "7,W,N,E" loop:True)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 15)}) (map "RightMost" {(pair P1 7) (pair P2 8)}) (regions "RightMost" P1 (sites {5 6})) (regions "RightMost" P2 (sites {9 10}))}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Opening" (play (move (from (sites Mover "RightMost") if:(is Occupied (from))) (to (mapEntry "RightMost" Mover)) count:(count at:(from)))) (nextPhase Mover (all Sites (sites Mover "RightMost") if:(is Empty (site))) "Sowing")) (phase "Sowing" (play (or {(if (is Occupied Cell (handSite Mover)) (forEach Value min:1 max:(count Cell at:(handSite Mover)) (do (set Var "NumToSow" (value)) next:(move (from Cell (handSite Mover)) (to (mapEntry "LeftMost" Mover)) count:(value) (then (and (sow count:(var "NumToSow") "TrackCCW" if:(or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) apply:(if (or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) forward:True) (set Var "NumToSow" 0))))))) (if (is Occupied Cell (handSite Mover)) (forEach Value min:1 max:(count Cell at:(handSite Mover)) (do (set Var "NumToSow" (value)) next:(move (from Cell (handSite Mover) if:(or (= 1 (count at:(if (is In (trackSite Move from:(mapEntry "LeftMost" Mover) "TrackCW" steps:(value)) (sites Bottom)) (+ (trackSite Move from:(mapEntry "LeftMost" Mover) "TrackCW" steps:(value)) 8) (- (trackSite Move from:(mapEntry "LeftMost" Mover) "TrackCW" steps:(value)) 8)))) (= 3 (count at:(if (is In (trackSite Move from:(mapEntry "LeftMost" Mover) "TrackCW" steps:(value)) (sites Bottom)) (+ (trackSite Move from:(mapEntry "LeftMost" Mover) "TrackCW" steps:(value)) 8) (- (trackSite Move from:(mapEntry "LeftMost" Mover) "TrackCW" steps:(value)) 8)))))) (to (mapEntry "LeftMost" Mover)) count:(value) (then (and (sow count:(var "NumToSow") "TrackCW" if:(or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) apply:(if (or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) forward:True) (set Var "NumToSow" 0))))))) (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow "TrackCCW" if:(or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) apply:(if (or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) forward:True))) (move Select (from (sites Mover) if:(and (< 0 (count at:(from))) (or (= 1 (count at:(if (is In (trackSite Move from:(from) "TrackCW" steps:(count at:(from))) (sites Bottom)) (+ (trackSite Move from:(from) "TrackCW" steps:(count at:(from))) 8) (- (trackSite Move from:(from) "TrackCW" steps:(count at:(from))) 8)))) (= 3 (count at:(if (is In (trackSite Move from:(from) "TrackCW" steps:(count at:(from))) (sites Bottom)) (+ (trackSite Move from:(from) "TrackCW" steps:(count at:(from))) 8) (- (trackSite Move from:(from) "TrackCW" steps:(count at:(from))) 8))))))) (then (sow "TrackCW" if:(or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) apply:(if (or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) forward:True)))})))} (end (forEach Player if:(all Sites (sites Player) if:(= 0 (count at:(site)))) (result Player Loss))))) | ###Description
2x8 board. Four counters in each hole. Play begins with both players placing all of the counters in the rightmost three holes in their row into the rightmost hole. Counters are sown in an anti-clockwise fashion, but they can be sown clockwise only if it leads to a capture. Counters are captured when the final counter is sown into a hole opposite a hole containing one or three counters, and those are take. If the hole opposite the next hole also contains one or three, these are also taken, continuing until a hole with any other number of counters is reached. Instead of taking counters from one of their holes, a player may sow any or all of the counters they have captured, beginning from the leftmost hole. The same rules for sowing apply. The game ends when one player has no counters in their holes.
###Ludii
(game "Iyogh" (players 2) (equipment {(mancalaBoard 2 8 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "7,W,N,E" loop:True)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 15)}) (map "RightMost" {(pair P1 7) (pair P2 8)}) (regions "RightMost" P1 (sites {5 6})) (regions "RightMost" P2 (sites {9 10}))}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Opening" (play (move (from (sites Mover "RightMost") if:(is Occupied (from))) (to (mapEntry "RightMost" Mover)) count:(count at:(from)))) (nextPhase Mover (all Sites (sites Mover "RightMost") if:(is Empty (site))) "Sowing")) (phase "Sowing" (play (or {(if (is Occupied Cell (handSite Mover)) (forEach Value min:1 max:(count Cell at:(handSite Mover)) (do (set Var "NumToSow" (value)) next:(move (from Cell (handSite Mover)) (to (mapEntry "LeftMost" Mover)) count:(value) (then (and (sow count:(var "NumToSow") "TrackCCW" if:(or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) apply:(if (or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) forward:True) (set Var "NumToSow" 0))))))) (if (is Occupied Cell (handSite Mover)) (forEach Value min:1 max:(count Cell at:(handSite Mover)) (do (set Var "NumToSow" (value)) next:(move (from Cell (handSite Mover) if:(or (= 1 (count at:(if (is In (trackSite Move from:(mapEntry "LeftMost" Mover) "TrackCW" steps:(value)) (sites Bottom)) (+ (trackSite Move from:(mapEntry "LeftMost" Mover) "TrackCW" steps:(value)) 8) (- (trackSite Move from:(mapEntry "LeftMost" Mover) "TrackCW" steps:(value)) 8)))) (= 3 (count at:(if (is In (trackSite Move from:(mapEntry "LeftMost" Mover) "TrackCW" steps:(value)) (sites Bottom)) (+ (trackSite Move from:(mapEntry "LeftMost" Mover) "TrackCW" steps:(value)) 8) (- (trackSite Move from:(mapEntry "LeftMost" Mover) "TrackCW" steps:(value)) 8)))))) (to (mapEntry "LeftMost" Mover)) count:(value) (then (and (sow count:(var "NumToSow") "TrackCW" if:(or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) apply:(if (or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) forward:True) (set Var "NumToSow" 0))))))) (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow "TrackCCW" if:(or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) apply:(if (or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) forward:True))) (move Select (from (sites Mover) if:(and (< 0 (count at:(from))) (or (= 1 (count at:(if (is In (trackSite Move from:(from) "TrackCW" steps:(count at:(from))) (sites Bottom)) (+ (trackSite Move from:(from) "TrackCW" steps:(count at:(from))) 8) (- (trackSite Move from:(from) "TrackCW" steps:(count at:(from))) 8)))) (= 3 (count at:(if (is In (trackSite Move from:(from) "TrackCW" steps:(count at:(from))) (sites Bottom)) (+ (trackSite Move from:(from) "TrackCW" steps:(count at:(from))) 8) (- (trackSite Move from:(from) "TrackCW" steps:(count at:(from))) 8))))))) (then (sow "TrackCW" if:(or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) apply:(if (or (= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))))) forward:True)))})))} (end (forEach Player if:(all Sites (sites Player) if:(= 0 (count at:(site)))) (result Player Loss))))) |
2x6 board. Four counters in each hole. Sowing proceeds in an anti-clockwise direction. When the final counter of a sowing lands in an occupied hole, the counters are picked up and sowing continues. When the final counter lands in an occupied hole in the player's own row causing it to contain four counters, these are captured and the turn ends. If the final counter falls into an empty hole, the turn ends. If at any point in the sowing a hole in the player's own row is made to contain four counters, they are taken. When there are only eight counters left on the board, the first player to make four counters in a hole captures all the remaining counters. At the end of the game, players place their captured counters four by four into the remaining holes. Players may thus capture holes from the opponent's row, one for every four counters placed in a hole. They may capture from these holes in the next round. Play continues until one player owns no holes. | (game "J'erin" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(< 0 (count at:(from)))) (then (do (set Var "NumSowed" (count at:(last To))) next:(if (and (>= 8 (count Pieces All in:(sites Board))) (not (all Sites (sites Track from:(trackSite Move from:(last From) "Track" steps:1) to:(trackSite Move from:(last From) "Track" steps:(var "NumSowed"))) if:(!= 3 (count at:(site)))))) (forEach Site (sites Board) (if (is Occupied (site)) (fromTo (from (site)) (to Cell (handSite Mover)) count:(count at:(site))))) (sow apply:(if (if (= 4 (count at:(to))) (not (is In (to) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2"))))) (!= 0 (count at:(to)))) (moveAgain))) (then (and (forEach Site (intersection (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2"))) (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(var "NumSowed")))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (handSite Mover)) count:4))) (set Var "NumSowed" 0)))))))} (then (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (and (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 4 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 4 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (move (from (handSite Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))))) (move (from (handSite Mover)) (to (sites Board) if:(is Empty (to))) count:4 (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To)))))))) (nextPhase (and (> 4 (count Cell at:(handSite P1))) (> 4 (count Cell at:(handSite P2)))) "Sowing"))})) | ###Description
2x6 board. Four counters in each hole. Sowing proceeds in an anti-clockwise direction. When the final counter of a sowing lands in an occupied hole, the counters are picked up and sowing continues. When the final counter lands in an occupied hole in the player's own row causing it to contain four counters, these are captured and the turn ends. If the final counter falls into an empty hole, the turn ends. If at any point in the sowing a hole in the player's own row is made to contain four counters, they are taken. When there are only eight counters left on the board, the first player to make four counters in a hole captures all the remaining counters. At the end of the game, players place their captured counters four by four into the remaining holes. Players may thus capture holes from the opponent's row, one for every four counters placed in a hole. They may capture from these holes in the next round. Play continues until one player owns no holes.
###Ludii
(game "J'erin" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(< 0 (count at:(from)))) (then (do (set Var "NumSowed" (count at:(last To))) next:(if (and (>= 8 (count Pieces All in:(sites Board))) (not (all Sites (sites Track from:(trackSite Move from:(last From) "Track" steps:1) to:(trackSite Move from:(last From) "Track" steps:(var "NumSowed"))) if:(!= 3 (count at:(site)))))) (forEach Site (sites Board) (if (is Occupied (site)) (fromTo (from (site)) (to Cell (handSite Mover)) count:(count at:(site))))) (sow apply:(if (if (= 4 (count at:(to))) (not (is In (to) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2"))))) (!= 0 (count at:(to)))) (moveAgain))) (then (and (forEach Site (intersection (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2"))) (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(var "NumSowed")))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (handSite Mover)) count:4))) (set Var "NumSowed" 0)))))))} (then (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (and (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 4 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 4 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (move (from (handSite Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))))) (move (from (handSite Mover)) (to (sites Board) if:(is Empty (to))) count:4 (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To)))))))) (nextPhase (and (> 4 (count Cell at:(handSite P1))) (> 4 (count Cell at:(handSite P2)))) "Sowing"))})) |
2x6 board, which two stores. Four counters in each hole. Sowing proceeds in an anti-clockwise direction. When the final counter of a sowing falls in to an occupied hole, these counters are picked up and sowing continues. When the final hole lands in an empty hole, if the hole is in the player's row, the contents of the opponent's opposite hole are captured. If the empty hole is in the opponent's row, the turn ends. A player must play so that the opponent is able to play on their next turn, if possible. The player who captures the most counters wins. | (game "J'odu" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) (play (do (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(< 0 (count at:(from)))) (then (sow apply:(if (> (count at:(to)) 1) (moveAgain) (if (is In (to) (sites Mover)) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (mapEntry (mover))) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))))))) ifAfterwards:(< 0 (count in:(if (is Mover P1) (sites P2) (sites P1)))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
2x6 board, which two stores. Four counters in each hole. Sowing proceeds in an anti-clockwise direction. When the final counter of a sowing falls in to an occupied hole, these counters are picked up and sowing continues. When the final hole lands in an empty hole, if the hole is in the player's row, the contents of the opponent's opposite hole are captured. If the empty hole is in the opponent's row, the turn ends. A player must play so that the opponent is able to play on their next turn, if possible. The player who captures the most counters wins.
###Ludii
(game "J'odu" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) (play (do (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(< 0 (count at:(from)))) (then (sow apply:(if (> (count at:(to)) 1) (moveAgain) (if (is In (to) (sites Mover)) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (mapEntry (mover))) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))))))) ifAfterwards:(< 0 (count in:(if (is Mover P1) (sites P2) (sites P1)))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
2x6 board. Four counters in each hole. In the opening phase, the player takes all of the counters in their rightmost hole and places them in the opponent's opposite hole. The player then takes the contents of the next hole, placing all of them into the hole following it, until the entire board has alternating holes with eight and zero counters. When the final hole is made with eight counters, these are picked up and the player sows as normal in an anti-clockwise direction. When the final counter falls into an occupied hole, the counters are picked up and sowing continues. When the final counter falls into an empty hole, the player captures the counters in the opposite hole. If a player cannot play, they must pass their turn until there are counters available for them to play. Play continues until there is one piece or fewer on the board, the player to whom the row in which the single piece is located captures it. A second round is played, each player placing four counters into each hole starting from the rightmost hole in their row. The player with more counters gains a hole from their opponent for every four extra balls they've captured. If an opponent has three extra after counting in such a way, they also gain a hole, and if each player has two remaining counters ownership is determined by chance. Play continues in several rounds like this until one player takes all the counters. | (game "Jimafesosh" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (map "RightMost" {(pair P1 5) (pair P2 6)}) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 4 to:(sites Track "TrackCCW"))}) phases:{(phase "Opening1" (play (move Select (from (if (is Prev Mover) (var "Replay") 5)) (then (sow numPerHole:4 "TrackCCW" apply:(and (moveAgain) (if (is Occupied (trackSite Move from:(to) "Track" steps:1)) (set Var "Replay" (trackSite Move from:(to) "Track" steps:1)) (set Var "Replay" -1))))))) (nextPhase (= -1 (var "Replay")) "Opening2")) (phase "Opening2" (play (move Select (from (if (and (is Prev Mover) (!= -1 (var "Replay"))) (var "Replay") 4)) (then (sow "TrackCCW" apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))))))))) (nextPhase (not (is Next Prev)) "Sowing")) (phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (sow "TrackCCW" apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))))))))} (then (if (>= 1 (count Pieces All in:(sites Board))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:4 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (= 3 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:3) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}) (if (= 2 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (if (< 50 (value Random (range 1 100))) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))})))}))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) | ###Description
2x6 board. Four counters in each hole. In the opening phase, the player takes all of the counters in their rightmost hole and places them in the opponent's opposite hole. The player then takes the contents of the next hole, placing all of them into the hole following it, until the entire board has alternating holes with eight and zero counters. When the final hole is made with eight counters, these are picked up and the player sows as normal in an anti-clockwise direction. When the final counter falls into an occupied hole, the counters are picked up and sowing continues. When the final counter falls into an empty hole, the player captures the counters in the opposite hole. If a player cannot play, they must pass their turn until there are counters available for them to play. Play continues until there is one piece or fewer on the board, the player to whom the row in which the single piece is located captures it. A second round is played, each player placing four counters into each hole starting from the rightmost hole in their row. The player with more counters gains a hole from their opponent for every four extra balls they've captured. If an opponent has three extra after counting in such a way, they also gain a hole, and if each player has two remaining counters ownership is determined by chance. Play continues in several rounds like this until one player takes all the counters.
###Ludii
(game "Jimafesosh" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (map "RightMost" {(pair P1 5) (pair P2 6)}) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 4 to:(sites Track "TrackCCW"))}) phases:{(phase "Opening1" (play (move Select (from (if (is Prev Mover) (var "Replay") 5)) (then (sow numPerHole:4 "TrackCCW" apply:(and (moveAgain) (if (is Occupied (trackSite Move from:(to) "Track" steps:1)) (set Var "Replay" (trackSite Move from:(to) "Track" steps:1)) (set Var "Replay" -1))))))) (nextPhase (= -1 (var "Replay")) "Opening2")) (phase "Opening2" (play (move Select (from (if (and (is Prev Mover) (!= -1 (var "Replay"))) (var "Replay") 4)) (then (sow "TrackCCW" apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))))))))) (nextPhase (not (is Next Prev)) "Sowing")) (phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (sow "TrackCCW" apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))))))))} (then (if (>= 1 (count Pieces All in:(sites Board))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:4 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (= 3 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:3) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}) (if (= 2 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (if (< 50 (value Random (range 1 100))) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))})))}))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) |
The board has two rows of six holes with a larger hole on either end. Play begins with four seeds in each hole. Each player controls the row nearest them. Seeds are sown consecutively in a counterclockwise pattern including the player's own larger hole but not the opponent's. If the last seed is placed in an opponent's empty hole, that seed and any opposite are captured and put in the player's larger hole. If the last seed falls in the larger hole, the player gets another turn. When one player has no seeds in any of their holes, the game ends. The other player captures all of the other seeds, and the player with the most captured seeds wins. | (game "Kalah" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "0,ESE,E,ENE,WNW,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 LastSite) (pair P2 FirstSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(union (sites P1) (sites P2)))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow apply:(if (= (to) (mapEntry (mover))) (moveAgain) (if (and {(is In (to) (sites Mover)) (= (count at:(to)) 1) (> (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))) 0)}) (and (fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (mapEntry (mover))) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))))) skipIf:(= (to) (mapEntry (next))))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
The board has two rows of six holes with a larger hole on either end. Play begins with four seeds in each hole. Each player controls the row nearest them. Seeds are sown consecutively in a counterclockwise pattern including the player's own larger hole but not the opponent's. If the last seed is placed in an opponent's empty hole, that seed and any opposite are captured and put in the player's larger hole. If the last seed falls in the larger hole, the player gets another turn. When one player has no seeds in any of their holes, the game ends. The other player captures all of the other seeds, and the player with the most captured seeds wins.
###Ludii
(game "Kalah" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "0,ESE,E,ENE,WNW,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 LastSite) (pair P2 FirstSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(union (sites P1) (sites P2)))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow apply:(if (= (to) (mapEntry (mover))) (moveAgain) (if (and {(is In (to) (sites Mover)) (= (count at:(to)) 1) (> (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))) 0)}) (and (fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (mapEntry (mover))) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))))) skipIf:(= (to) (mapEntry (next))))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
Two rows of seven holes. Twelve counters in each hole, except in the central hole of each row, one of which has one counter and the other is empty. Players do not own a row of holes, rather each player owns the six holes on one side of the central holes. Sowing occurs in an anti-clockwise direction. Neither player may begin sowing from the central holes. When sowing ends, if the next hole after the hole in which the final counter was placed is occupied, these counters are picked up and sown. If this hole is empty, the counters in the hole opposite it are captured. Play continues until all of the counters have been captured. The player who captures the most pieces wins. | (game "Kanji Guti" (players 2) (equipment {(mancalaBoard 2 7 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions "Home" P1 (expand (sites Left) steps:2)) (regions "Home" P2 (expand (sites Right) steps:2))}) (rules (start {(set Count 1 at:(coord "D1")) (set Count 12 to:(difference (sites Track) (sites Centre)))}) (play (move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) steps:1)}) (sites Mover)) if:(< 0 (count at:(from)))) (then (sow apply:(if (> (count at:(trackSite Move from:(to) steps:1)) 0) (moveAgain) (if (> (count at:(if (is In (trackSite Move from:(to) steps:1) (sites Bottom)) (+ (trackSite Move from:(to) steps:1) 7) (- (trackSite Move from:(to) steps:1) 7))) 0) (fromTo (from (if (is In (trackSite Move from:(to) steps:1) (sites Bottom)) (+ (trackSite Move from:(to) steps:1) 7) (- (trackSite Move from:(to) steps:1) 7))) (to (handSite Mover)) count:(count at:(if (is In (trackSite Move from:(to) steps:1) (sites Bottom)) (+ (trackSite Move from:(to) steps:1) 7) (- (trackSite Move from:(to) steps:1) 7)))))))))) (end (if (= 0 (count in:(sites Track))) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) | ###Description
Two rows of seven holes. Twelve counters in each hole, except in the central hole of each row, one of which has one counter and the other is empty. Players do not own a row of holes, rather each player owns the six holes on one side of the central holes. Sowing occurs in an anti-clockwise direction. Neither player may begin sowing from the central holes. When sowing ends, if the next hole after the hole in which the final counter was placed is occupied, these counters are picked up and sown. If this hole is empty, the counters in the hole opposite it are captured. Play continues until all of the counters have been captured. The player who captures the most pieces wins.
###Ludii
(game "Kanji Guti" (players 2) (equipment {(mancalaBoard 2 7 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions "Home" P1 (expand (sites Left) steps:2)) (regions "Home" P2 (expand (sites Right) steps:2))}) (rules (start {(set Count 1 at:(coord "D1")) (set Count 12 to:(difference (sites Track) (sites Centre)))}) (play (move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) steps:1)}) (sites Mover)) if:(< 0 (count at:(from)))) (then (sow apply:(if (> (count at:(trackSite Move from:(to) steps:1)) 0) (moveAgain) (if (> (count at:(if (is In (trackSite Move from:(to) steps:1) (sites Bottom)) (+ (trackSite Move from:(to) steps:1) 7) (- (trackSite Move from:(to) steps:1) 7))) 0) (fromTo (from (if (is In (trackSite Move from:(to) steps:1) (sites Bottom)) (+ (trackSite Move from:(to) steps:1) 7) (- (trackSite Move from:(to) steps:1) 7))) (to (handSite Mover)) count:(count at:(if (is In (trackSite Move from:(to) steps:1) (sites Bottom)) (+ (trackSite Move from:(to) steps:1) 7) (- (trackSite Move from:(to) steps:1) 7)))))))))) (end (if (= 0 (count in:(sites Track))) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) |
2x3 board. Eight counters in each pile. A player takes the counters from any of the piles and sows them anti-clockwise, beginning with the pile from which the counters were taken. Any piles that now contain 2, 4, or 6 counters are captured. The player who captures the most counters wins. | (game "Kapana Bona" (players 2) (equipment {(mancalaBoard 2 3 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 8 to:(sites Track))) (play (move Select (from (sites Board) if:(> (count at:(from)) 0)) (then (sow origin:True (then (forEach Site (sites Board) (if (or {(= (count at:(site)) 2) (= (count at:(site)) 4) (= (count at:(site)) 6)}) (fromTo (from (site)) (to (handSite Mover)) count:(count at:(site)))))))))) (end (if (= 0 (count Sites in:(forEach (sites Board) if:(< 1 (count at:(site)))))) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) | ###Description
2x3 board. Eight counters in each pile. A player takes the counters from any of the piles and sows them anti-clockwise, beginning with the pile from which the counters were taken. Any piles that now contain 2, 4, or 6 counters are captured. The player who captures the most counters wins.
###Ludii
(game "Kapana Bona" (players 2) (equipment {(mancalaBoard 2 3 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 8 to:(sites Track))) (play (move Select (from (sites Board) if:(> (count at:(from)) 0)) (then (sow origin:True (then (forEach Site (sites Board) (if (or {(= (count at:(site)) 2) (= (count at:(site)) 4) (= (count at:(site)) 6)}) (fromTo (from (site)) (to (handSite Mover)) count:(count at:(site)))))))))) (end (if (= 0 (count Sites in:(forEach (sites Board) if:(< 1 (count at:(site)))))) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) |
Play begins with seven counters in each hole. Players begin by picking up the counters in one of their holes and sowing them anti-clockwise. If the final counter lands in an opponent's hole or the rightmost hole belonging to the player sowing, having dropped counters in the opponent's holes making them contain two, four, or six counters, the contents of those holes are captured. The player who has the most counters at the end of the game wins. | (game "Kara" (players 2) (equipment {(mancalaBoard 2 3 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (map "RightHole" {(pair P1 3) (pair P2 4)}) (piece "Seed" Shared)}) (rules (start (set Count 7 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow if:(and (is In (count at:(to)) (sites {2 4 6})) (is In (to) (union (sites Next) (sites {(mapEntry "RightHole" (mover))})))) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
Play begins with seven counters in each hole. Players begin by picking up the counters in one of their holes and sowing them anti-clockwise. If the final counter lands in an opponent's hole or the rightmost hole belonging to the player sowing, having dropped counters in the opponent's holes making them contain two, four, or six counters, the contents of those holes are captured. The player who has the most counters at the end of the game wins.
###Ludii
(game "Kara" (players 2) (equipment {(mancalaBoard 2 3 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (map "RightHole" {(pair P1 3) (pair P2 4)}) (piece "Seed" Shared)}) (rules (start (set Count 7 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow if:(and (is In (count at:(to)) (sites {2 4 6})) (is In (to) (union (sites Next) (sites {(mapEntry "RightHole" (mover))})))) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
2x6 board, one store on either end. Four counters in each hole. Sowing occurs in an anti-clockwise direction and begins in the player's row. When the final counter lands in an occupied hole which is not followed by an empty hole, the contents are picked up and sowing continues. If the final counter falls in an occupied hole followed by an empty hole, or if it falls into an empty hole, the turn ends. Sowing always skips the hole from which the sowing began if it goes all the way around the board. When the final counter falls into an occupied hole in the opponent's row containing three counters, these are captured and the turn ends. Any holes in the opponent's row containing four counters in an unbroken consecutive sequence behind this hole are also captured. Single counters can only be sowed when the next hole is empty. Play continues until one player can no longer play. The player who has captured the most counters wins. | (game "Kay" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (piece "Seed" Shared) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(or (< 1 (count at:(from))) (and (= 1 (count at:(from))) (is Empty (trackSite Move from:(from) "Track" steps:1))))) (then (sow if:True apply:(if (= 4 (count at:(to))) (fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to))) (if (< 1 (count at:(to))) (if (is Occupied (trackSite Move from:(to) "Track" steps:1)) (moveAgain)))) includeSelf:False backtracking:(= 4 (count at:(to))))))) (end (if (no Moves Next) (byScore {(score P1 (count at:(mapEntry P1))) (score P2 (count at:(mapEntry P2)))}))))) | ###Description
2x6 board, one store on either end. Four counters in each hole. Sowing occurs in an anti-clockwise direction and begins in the player's row. When the final counter lands in an occupied hole which is not followed by an empty hole, the contents are picked up and sowing continues. If the final counter falls in an occupied hole followed by an empty hole, or if it falls into an empty hole, the turn ends. Sowing always skips the hole from which the sowing began if it goes all the way around the board. When the final counter falls into an occupied hole in the opponent's row containing three counters, these are captured and the turn ends. Any holes in the opponent's row containing four counters in an unbroken consecutive sequence behind this hole are also captured. Single counters can only be sowed when the next hole is empty. Play continues until one player can no longer play. The player who has captured the most counters wins.
###Ludii
(game "Kay" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (piece "Seed" Shared) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(or (< 1 (count at:(from))) (and (= 1 (count at:(from))) (is Empty (trackSite Move from:(from) "Track" steps:1))))) (then (sow if:True apply:(if (= 4 (count at:(to))) (fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to))) (if (< 1 (count at:(to))) (if (is Occupied (trackSite Move from:(to) "Track" steps:1)) (moveAgain)))) includeSelf:False backtracking:(= 4 (count at:(to))))))) (end (if (no Moves Next) (byScore {(score P1 (count at:(mapEntry P1))) (score P2 (count at:(mapEntry P2)))}))))) |
2x2, 3, 4, or 6 board. Each hole contains a number of counters equal to the total number of holes in the board. Sowing begins from any hole in the player's row, and proceeds anti-clockwise. Counters are captured when the final counter lands in an occupied hole, making it contain 2, 4, 6, or 8 counters. When all of the counters have been captured, a second game begins. Each player fills their holes with the same number of counters as the beginning of the previous game. The player who has extra counters holds these in reserve. The other player will have either empty holes or one without the requisite number to fill the hole. Sowing cannot begin and captures cannot be made from these holes until the contents of these holes reaches the required number of counters to fill them. The second player in the first game now becomes the first player. Play continues with subsequent games until one player captures all the counters. Evidence Map Each player has 2 holes. | (game "Khrour" (players 2) (equipment {(mancalaBoard 2 2 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or {(move Select (from (sites Mover) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow apply:(if (and (or {(= 2 (count at:(to))) (= 4 (count at:(to))) (= 6 (count at:(to))) (= 8 (count at:(to)))}) (is In (to) (sites (values Remembered "Playable")))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))))))} (then (if (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) (forget Value "Playable" All) (forEach Site (difference (sites Board) (sites (values Remembered "Playable"))) (if (<= 4 (count at:(site))) (remember Value "Playable" (site)))))))) (end (if (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (remember Value "Playable" (last To)))) (move (from (handSite Mover)) (to (sites Mover) if:(is Empty (to))) count:(count Cell at:(handSite Mover)))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x2, 3, 4, or 6 board. Each hole contains a number of counters equal to the total number of holes in the board. Sowing begins from any hole in the player's row, and proceeds anti-clockwise. Counters are captured when the final counter lands in an occupied hole, making it contain 2, 4, 6, or 8 counters. When all of the counters have been captured, a second game begins. Each player fills their holes with the same number of counters as the beginning of the previous game. The player who has extra counters holds these in reserve. The other player will have either empty holes or one without the requisite number to fill the hole. Sowing cannot begin and captures cannot be made from these holes until the contents of these holes reaches the required number of counters to fill them. The second player in the first game now becomes the first player. Play continues with subsequent games until one player captures all the counters. Evidence Map Each player has 2 holes.
###Ludii
(game "Khrour" (players 2) (equipment {(mancalaBoard 2 2 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or {(move Select (from (sites Mover) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow apply:(if (and (or {(= 2 (count at:(to))) (= 4 (count at:(to))) (= 6 (count at:(to))) (= 8 (count at:(to)))}) (is In (to) (sites (values Remembered "Playable")))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))))))} (then (if (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) (forget Value "Playable" All) (forEach Site (difference (sites Board) (sites (values Remembered "Playable"))) (if (<= 4 (count at:(site))) (remember Value "Playable" (site)))))))) (end (if (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (remember Value "Playable" (last To)))) (move (from (handSite Mover)) (to (sites Mover) if:(is Empty (to))) count:(count Cell at:(handSite Mover)))))) (nextPhase (all Passed) "Sowing"))})) |
2x5 board. Five counters in each hole. Players take turns sowing in an anti-clockwise direction. When the final counter lands in a hole, the player picks up the contents of the next hole following this one, and continues sowing. If the player cannot pick up any counters from this hole, the players captures any counters from the hole after the empty hole, and the turn ends. Whenever any holes in the player's row contain four counters, they are captured by the player. Play continues until all of the counters have been captured. A new round begins. The players count their captured counters. If the difference between the two players' captured counters is greater than five, for each multiple of five in the difference a hole on the player with fewer counters' side is eliminated from play, and the excess counters that equal a multiple of five are placed aside for use in further rounds if necessary. When the difference is less than five, and when dealing with the remaining pieces after the multiples of five are dealt with, The following scenarios apply. When one player has one counter and the other has four, the player with one will give their stone to the one with four, but the player who has one counter will receive one counter from the hole from which sowing begins at the beginning of each player's turn. When one player has two counters and the other has three, the player with two gives these counters to the other player. With these five, the player creates a "bha" from one of holes in their row. The bha must be either the leftmost or rightmost hole. Every counter dropped into this hole during the course of play is captured by the owner of the hole. At the end of the round, the player who created the bha must return the number of counters given to them at the beginning of the round back to the other player. The holes which remain in play are then filled with five counters each from each player's captured counters and play continues as before. until one player captures all of the counters. | (game "Khutka Boia" (players 2) (equipment {(mancalaBoard 2 5 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start {(set Count 5 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or {(or {(move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) "Track" steps:1)}) (sites Mover)) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (do (if (= 1 (value Player Next)) (fromTo (from (last From)) (to (handSite Mover)) count:1)) next:(sow (last From) apply:(if (is Occupied (trackSite Move from:(to) "Track" steps:1)) (moveAgain) (if (is Occupied (trackSite Move from:(to) "Track" steps:2)) (fromTo (from (trackSite Move from:(to) "Track" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "Track" steps:2))))) skipIf:(not (is In (to) (sites (values Remembered "Playable"))))))))} (then (and {(forEach Player (forEach Site (sites Player) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (handSite Player)) count:4)))) (forEach Site (sites P1) (if (and (is Occupied (site)) (= 1 (state at:(site)))) (and (fromTo (from (site)) (to (handSite Player)) count:(count at:(site))) (set State at:(site) 1)))) (forEach Site (sites P2) (if (and (is Occupied (site)) (= 2 (state at:(site)))) (and (fromTo (from (site)) (to (handSite Player)) count:(count at:(site))) (set State at:(site) 2))))})))} (then (if (= 1 (count Pieces All in:(union (sites Top) (sites Bottom)))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forEach Site (sites Board) (if (!= 0 (state at:(site))) (set State at:(site) 0))) (set Value P1 0) (set Value P2 0) (forget Value "Playable" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 5 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (sites Mover) if:(is Empty (to))) count:5 (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "DecisionForNextRound")) (phase "DecisionForNextRound" (play (if (> 5 (abs (- (count Cell at:(handSite P1)) (count Cell at:(handSite P2))))) (do (if (= 1 (count Cell at:(handSite P1))) (and (set Value P1 1) (fromTo (from (handSite P1)) (to (handSite P2)) count:1)) (if (= 1 (count Cell at:(handSite P2))) (and (set Value P2 1) (fromTo (from (handSite P2)) (to (handSite P1)) count:1)) (if (= 2 (count Cell at:(handSite P2))) (set Var "Bha" 1) (if (= 2 (count Cell at:(handSite P1))) (set Var "Bha" 2))))) next:(if (= (var "Bha") P1) (move Select (from (intersection (union (sites Left) (sites Right)) (sites P1))) (then (and (set State at:(last To) 1) (set Var "Bha" 0)))) (if (= (var "Bha") P2) (move Select (from (intersection (union (sites Left) (sites Right)) (sites P2))) (then (and (set State at:(last To) 2) (set Var "Bha" 0)))) (move Pass)))) (move Pass))) (nextPhase "Sowing"))})) | ###Description
2x5 board. Five counters in each hole. Players take turns sowing in an anti-clockwise direction. When the final counter lands in a hole, the player picks up the contents of the next hole following this one, and continues sowing. If the player cannot pick up any counters from this hole, the players captures any counters from the hole after the empty hole, and the turn ends. Whenever any holes in the player's row contain four counters, they are captured by the player. Play continues until all of the counters have been captured. A new round begins. The players count their captured counters. If the difference between the two players' captured counters is greater than five, for each multiple of five in the difference a hole on the player with fewer counters' side is eliminated from play, and the excess counters that equal a multiple of five are placed aside for use in further rounds if necessary. When the difference is less than five, and when dealing with the remaining pieces after the multiples of five are dealt with, The following scenarios apply. When one player has one counter and the other has four, the player with one will give their stone to the one with four, but the player who has one counter will receive one counter from the hole from which sowing begins at the beginning of each player's turn. When one player has two counters and the other has three, the player with two gives these counters to the other player. With these five, the player creates a "bha" from one of holes in their row. The bha must be either the leftmost or rightmost hole. Every counter dropped into this hole during the course of play is captured by the owner of the hole. At the end of the round, the player who created the bha must return the number of counters given to them at the beginning of the round back to the other player. The holes which remain in play are then filled with five counters each from each player's captured counters and play continues as before. until one player captures all of the counters.
###Ludii
(game "Khutka Boia" (players 2) (equipment {(mancalaBoard 2 5 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start {(set Count 5 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or {(or {(move Select (from (if (is Prev Mover) (sites {(trackSite Move from:(last To afterConsequence:True) "Track" steps:1)}) (sites Mover)) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (do (if (= 1 (value Player Next)) (fromTo (from (last From)) (to (handSite Mover)) count:1)) next:(sow (last From) apply:(if (is Occupied (trackSite Move from:(to) "Track" steps:1)) (moveAgain) (if (is Occupied (trackSite Move from:(to) "Track" steps:2)) (fromTo (from (trackSite Move from:(to) "Track" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "Track" steps:2))))) skipIf:(not (is In (to) (sites (values Remembered "Playable"))))))))} (then (and {(forEach Player (forEach Site (sites Player) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (handSite Player)) count:4)))) (forEach Site (sites P1) (if (and (is Occupied (site)) (= 1 (state at:(site)))) (and (fromTo (from (site)) (to (handSite Player)) count:(count at:(site))) (set State at:(site) 1)))) (forEach Site (sites P2) (if (and (is Occupied (site)) (= 2 (state at:(site)))) (and (fromTo (from (site)) (to (handSite Player)) count:(count at:(site))) (set State at:(site) 2))))})))} (then (if (= 1 (count Pieces All in:(union (sites Top) (sites Bottom)))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forEach Site (sites Board) (if (!= 0 (state at:(site))) (set State at:(site) 0))) (set Value P1 0) (set Value P2 0) (forget Value "Playable" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 5 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (sites Mover) if:(is Empty (to))) count:5 (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "DecisionForNextRound")) (phase "DecisionForNextRound" (play (if (> 5 (abs (- (count Cell at:(handSite P1)) (count Cell at:(handSite P2))))) (do (if (= 1 (count Cell at:(handSite P1))) (and (set Value P1 1) (fromTo (from (handSite P1)) (to (handSite P2)) count:1)) (if (= 1 (count Cell at:(handSite P2))) (and (set Value P2 1) (fromTo (from (handSite P2)) (to (handSite P1)) count:1)) (if (= 2 (count Cell at:(handSite P2))) (set Var "Bha" 1) (if (= 2 (count Cell at:(handSite P1))) (set Var "Bha" 2))))) next:(if (= (var "Bha") P1) (move Select (from (intersection (union (sites Left) (sites Right)) (sites P1))) (then (and (set State at:(last To) 1) (set Var "Bha" 0)))) (if (= (var "Bha") P2) (move Select (from (intersection (union (sites Left) (sites Right)) (sites P2))) (then (and (set State at:(last To) 2) (set Var "Bha" 0)))) (move Pass)))) (move Pass))) (nextPhase "Sowing"))})) |
2x6 board. Four counters per hole. Each player's rightmost hole is their "hogon," from which they cannot sow, except they must when it reaches fourteen counters. Sowing occurs in an anti-clockwise direction. Sowing from a hole with a single counter is forbidden. When the older player has only single counters in their regular holes, they pass. When the younger player has only single counters in their regular holes, they sow from their hogon. When a player must sow from their hogon and the opponent's holes only contain single counters, the player picks these up and sows them along with the contents of the hogon. When one player only has single counters in their row, the opponent wins. Each row has 6 holes. Each hole has initially 4 seeds. | (game "Koro" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (map "Hogon" {(pair P1 5) (pair P2 6)}) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 4 to:(sites Track))) (play (if (<= 14 (count at:(mapEntry "Hogon" Mover))) (move Select (from (mapEntry "Hogon" Mover)) (then (sow))) (if (all Sites (difference (sites Mover) (mapEntry "Hogon" Mover)) if:(>= 1 (count at:(site)))) (if (is Mover P1) (move Pass) (do (if (all Sites (difference (sites Next) (mapEntry "Hogon" Next)) if:(>= 1 (count at:(site)))) (forEach Site (difference (sites Next) (mapEntry "Hogon" Next)) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry "Hogon" Mover)))))) next:(move Select (from (mapEntry "Hogon" Mover) if:(< 1 (count at:(from)))) (then (sow))))) (move Select (from (difference (sites Mover) (mapEntry "Hogon" Mover)) if:(< 1 (count at:(from)))) (then (sow)))))) (end (forEach Player if:(all Sites (sites Player) if:(>= 1 (count at:(site)))) (result Player Loss))))) | ###Description
2x6 board. Four counters per hole. Each player's rightmost hole is their "hogon," from which they cannot sow, except they must when it reaches fourteen counters. Sowing occurs in an anti-clockwise direction. Sowing from a hole with a single counter is forbidden. When the older player has only single counters in their regular holes, they pass. When the younger player has only single counters in their regular holes, they sow from their hogon. When a player must sow from their hogon and the opponent's holes only contain single counters, the player picks these up and sows them along with the contents of the hogon. When one player only has single counters in their row, the opponent wins. Each row has 6 holes. Each hole has initially 4 seeds.
###Ludii
(game "Koro" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (map "Hogon" {(pair P1 5) (pair P2 6)}) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 4 to:(sites Track))) (play (if (<= 14 (count at:(mapEntry "Hogon" Mover))) (move Select (from (mapEntry "Hogon" Mover)) (then (sow))) (if (all Sites (difference (sites Mover) (mapEntry "Hogon" Mover)) if:(>= 1 (count at:(site)))) (if (is Mover P1) (move Pass) (do (if (all Sites (difference (sites Next) (mapEntry "Hogon" Next)) if:(>= 1 (count at:(site)))) (forEach Site (difference (sites Next) (mapEntry "Hogon" Next)) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry "Hogon" Mover)))))) next:(move Select (from (mapEntry "Hogon" Mover) if:(< 1 (count at:(from)))) (then (sow))))) (move Select (from (difference (sites Mover) (mapEntry "Hogon" Mover)) if:(< 1 (count at:(from)))) (then (sow)))))) (end (forEach Player if:(all Sites (sites Player) if:(>= 1 (count at:(site)))) (result Player Loss))))) |
2x7 board with two stores. Four counters in each hole. Sowing occurs in either a clockwise or anti-clockwise direction; the first player chooses the direction and all subsequent moves are made in that direction. The first turn of each player must occur from one of the player's end holes. Players sow beginning from holes in their row. In the course of sowing, a player cannot sow into a hole containing three counters; if one is encountered, it is skipped and the counter is sowed into the next hole without three. If the final counter falls into a hole containing three counters, the contents of the hole are captured and the contents of the next hole are picked up and sowing continues. However, if the hole fitting these conditions is an end hole, it is treated as a puta or naga hole as described below. Otherwise, if the last counter falls into a hole with counters, these are picked up and sowing continues, or if it falls into an empty hole or one treated as a naga or puta hole, the turn ends. Throughout the game, single counters cannot be moved if a player has a hole with multiple counters, and a single counter in the front hole cannot be moved if there are other single counters in the player's row. The round ends when one player's holes are empty. A second round begins with the winner of the first round placing four counters in each of their holes, leaving any surplus in the store. The loser of round one places four counters in as many consecutive holes on their side of the board as possible, and any remaining counters in the next hole. If this hole contains one, it is called puta, if two, naga, if three, wala. Holes with no counters are excluded from play for this round. If the loser has a puta hole, the opponent removes three counters from their hole opposite; if a naga, the opponent removes two from the opposite hole, if a wala, the opponent removes one. The removed counters go into their store. Puta and naga holes are marked with a piece of paper or straw in them. Empty holes are excluded from play in this round. The losing player begins the round, moving in the direction of the excluded holes, and played in the same way as the first round. The player with empty holes begins play in the direction of the empty hole. Counters cannot be captured or sowed from puta or naga holes. Play continues as before. When one player has fewer than twelve counters at the beginning of a round, they may arrange them differently at the beginning. They may put one or two counters in one end hole and not more than four in the other end hole, and one or two counters in the intermediate holes, leaving some empty and, thus, excluded. The opponent then puts four counters in each of their holes. There are no puta, naga, or wala holes in this round. The player with more counters plays as before, but the one with less has captures that are determined by the number of counters placed in the first end hole. If there were two in the end hole, the player captures when dropping the final counter into a hole to make it three; or when it makes two if there was one counter in the first end hole. Otherwise, the player does not sow in holes with one or two counters. Play continues until one player cannot sow at the beginning of a round. | (game "Kotu Baendum" (players 2) (equipment {(mancalaBoard 2 7 {(track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "7,W,N,E" loop:True)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "StartingMove" P1 (play (or (move Select (from (intersection (sites Mover) (expand (sites Corners))) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (and (sow "TrackCCW" apply:(if (= 4 (count at:(to))) (and (if (is In (to) (expand (sites Corners))) (set Var "Blocked" (to)) (if (!= 0 (count at:(trackSite Move from:(to) "TrackCCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCCW" steps:1))))) (fromTo (from (to)) (to (mapEntry Mover)) count:4)) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))) (set Var "Direction" 1)))) (move Select (from (intersection (sites Mover) (expand (sites Corners))) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (and (sow "TrackCW" apply:(if (= 4 (count at:(to))) (and (if (is In (to) (expand (sites Corners))) (set Var "Blocked" (to)) (if (!= 0 (count at:(trackSite Move from:(to) "TrackCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCW" steps:1))))) (fromTo (from (to)) (to (mapEntry Mover)) count:4)) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))) (set Var "Direction" 2)))))) (nextPhase Mover "Sowing")) (phase "StartingMove" P2 (play (if (= 1 (var "Direction")) (move Select (from (intersection (sites Mover) (expand (sites Corners))) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow "TrackCCW" apply:(if (= 4 (count at:(to))) (and (if (is In (to) (expand (sites Corners))) (set Var "Blocked" (to)) (if (!= 0 (count at:(trackSite Move from:(to) "TrackCCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCCW" steps:1))))) (fromTo (from (to)) (to (mapEntry Mover)) count:4)) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))))) (move Select (from (intersection (sites Mover) (expand (sites Corners))) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow "TrackCW" apply:(if (= 4 (count at:(to))) (and (if (is In (to) (expand (sites Corners))) (set Var "Blocked" (to)) (if (!= 0 (count at:(trackSite Move from:(to) "TrackCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCW" steps:1))))) (fromTo (from (to)) (to (mapEntry Mover)) count:4)) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))))))) (nextPhase Mover "Sowing")) (phase "Sowing" (play (if (= 1 (var "Direction")) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (not (is In (from) (sites (values Remembered "Blocked")))) (if (not (all Sites (forEach (sites Mover) if:(is In (site) (sites (values Remembered "Playable")))) if:(>= 1 (count at:(site))))) (< 1 (count at:(from))))})) (then (sow "TrackCCW" apply:(if (= 4 (count at:(to))) (and (if (is In (to) (expand (sites Corners))) (set Var "Blocked" (to)) (if (!= 0 (count at:(trackSite Move from:(to) "TrackCCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCCW" steps:1))))) (if (not (is In (to) (sites (values Remembered "Blocked")))) (fromTo (from (to)) (to (mapEntry Mover)) count:4))) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))))) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (not (is In (from) (sites (values Remembered "Blocked")))) (if (not (all Sites (forEach (sites Mover) if:(is In (site) (sites (values Remembered "Playable")))) if:(>= 1 (count at:(site))))) (< 1 (count at:(from))))})) (then (sow "TrackCW" apply:(if (= 4 (count at:(to))) (and (if (is In (to) (expand (sites Corners))) (set Var "Blocked" (to)) (if (!= 0 (count at:(trackSite Move from:(to) "TrackCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCW" steps:1))))) (if (not (is In (to) (sites (values Remembered "Blocked")))) (fromTo (from (to)) (to (mapEntry Mover)) count:4))) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))))) (then (if (no Moves Next) (and {(forEach Site (sites P1) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))) (forget Value "Playable" All) (forget Value "Blocked" All) (if (< (+ (count at:(mapEntry P1)) (count in:(sites P1))) (+ (count at:(mapEntry P2)) (count in:(sites P2)))) (and (set NextPlayer (player 2)) (set Var "Winner" 2)) (and (set NextPlayer (player 1)) (set Var "Winner" 1)))}))))) (end (if (no Moves Next) {(if (> 2 (count at:(mapEntry P1))) (result P2 Win)) (if (> 2 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (no Moves Next) "BetweenRounds")) (phase "BetweenRounds" (play (if (and (not (is Prev Mover)) (!= (mover) (var "Winner"))) (or (move (from (mapEntry Mover)) (to (if (is Mover P1) (intersection (sites Bottom) (expand (sites Right))) (intersection (sites Top) (expand (sites Left)))) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (if (> 4 (count at:(last To))) (and (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (mapEntry Next)) count:(- 4 (count at:(last To)))) (remember Value "Blocked" (last To)))) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending)) (set Var "Direction" 2)}))) (move (from (mapEntry Mover)) (to (if (is Mover P1) (intersection (sites Bottom) (expand (sites Left))) (intersection (sites Top) (expand (sites Right)))) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (if (> 4 (count at:(last To))) (and (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (mapEntry Next)) count:(- 4 (count at:(last To)))) (remember Value "Blocked" (last To)))) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending)) (set Var "Direction" 1)})))) (if (!= (mover) (var "Winner")) (move (from (mapEntry Mover)) (to (if (= (var "Direction") 1) (trackSite Move from:(last To) "TrackCCW" steps:1) (trackSite Move from:(last To) "TrackCW" steps:1)) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending))}))) (move (from (mapEntry Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (and (remember Value "Playable" (last To)) (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (moveAgain)))))))) (nextPhase (and (!= (var "Winner") (mover)) (= 0 (count at:(mapEntry Mover)))) "Sowing"))})) | ###Description
2x7 board with two stores. Four counters in each hole. Sowing occurs in either a clockwise or anti-clockwise direction; the first player chooses the direction and all subsequent moves are made in that direction. The first turn of each player must occur from one of the player's end holes. Players sow beginning from holes in their row. In the course of sowing, a player cannot sow into a hole containing three counters; if one is encountered, it is skipped and the counter is sowed into the next hole without three. If the final counter falls into a hole containing three counters, the contents of the hole are captured and the contents of the next hole are picked up and sowing continues. However, if the hole fitting these conditions is an end hole, it is treated as a puta or naga hole as described below. Otherwise, if the last counter falls into a hole with counters, these are picked up and sowing continues, or if it falls into an empty hole or one treated as a naga or puta hole, the turn ends. Throughout the game, single counters cannot be moved if a player has a hole with multiple counters, and a single counter in the front hole cannot be moved if there are other single counters in the player's row. The round ends when one player's holes are empty. A second round begins with the winner of the first round placing four counters in each of their holes, leaving any surplus in the store. The loser of round one places four counters in as many consecutive holes on their side of the board as possible, and any remaining counters in the next hole. If this hole contains one, it is called puta, if two, naga, if three, wala. Holes with no counters are excluded from play for this round. If the loser has a puta hole, the opponent removes three counters from their hole opposite; if a naga, the opponent removes two from the opposite hole, if a wala, the opponent removes one. The removed counters go into their store. Puta and naga holes are marked with a piece of paper or straw in them. Empty holes are excluded from play in this round. The losing player begins the round, moving in the direction of the excluded holes, and played in the same way as the first round. The player with empty holes begins play in the direction of the empty hole. Counters cannot be captured or sowed from puta or naga holes. Play continues as before. When one player has fewer than twelve counters at the beginning of a round, they may arrange them differently at the beginning. They may put one or two counters in one end hole and not more than four in the other end hole, and one or two counters in the intermediate holes, leaving some empty and, thus, excluded. The opponent then puts four counters in each of their holes. There are no puta, naga, or wala holes in this round. The player with more counters plays as before, but the one with less has captures that are determined by the number of counters placed in the first end hole. If there were two in the end hole, the player captures when dropping the final counter into a hole to make it three; or when it makes two if there was one counter in the first end hole. Otherwise, the player does not sow in holes with one or two counters. Play continues until one player cannot sow at the beginning of a round.
###Ludii
(game "Kotu Baendum" (players 2) (equipment {(mancalaBoard 2 7 {(track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "7,W,N,E" loop:True)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "StartingMove" P1 (play (or (move Select (from (intersection (sites Mover) (expand (sites Corners))) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (and (sow "TrackCCW" apply:(if (= 4 (count at:(to))) (and (if (is In (to) (expand (sites Corners))) (set Var "Blocked" (to)) (if (!= 0 (count at:(trackSite Move from:(to) "TrackCCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCCW" steps:1))))) (fromTo (from (to)) (to (mapEntry Mover)) count:4)) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))) (set Var "Direction" 1)))) (move Select (from (intersection (sites Mover) (expand (sites Corners))) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (and (sow "TrackCW" apply:(if (= 4 (count at:(to))) (and (if (is In (to) (expand (sites Corners))) (set Var "Blocked" (to)) (if (!= 0 (count at:(trackSite Move from:(to) "TrackCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCW" steps:1))))) (fromTo (from (to)) (to (mapEntry Mover)) count:4)) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))) (set Var "Direction" 2)))))) (nextPhase Mover "Sowing")) (phase "StartingMove" P2 (play (if (= 1 (var "Direction")) (move Select (from (intersection (sites Mover) (expand (sites Corners))) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow "TrackCCW" apply:(if (= 4 (count at:(to))) (and (if (is In (to) (expand (sites Corners))) (set Var "Blocked" (to)) (if (!= 0 (count at:(trackSite Move from:(to) "TrackCCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCCW" steps:1))))) (fromTo (from (to)) (to (mapEntry Mover)) count:4)) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))))) (move Select (from (intersection (sites Mover) (expand (sites Corners))) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow "TrackCW" apply:(if (= 4 (count at:(to))) (and (if (is In (to) (expand (sites Corners))) (set Var "Blocked" (to)) (if (!= 0 (count at:(trackSite Move from:(to) "TrackCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCW" steps:1))))) (fromTo (from (to)) (to (mapEntry Mover)) count:4)) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))))))) (nextPhase Mover "Sowing")) (phase "Sowing" (play (if (= 1 (var "Direction")) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (not (is In (from) (sites (values Remembered "Blocked")))) (if (not (all Sites (forEach (sites Mover) if:(is In (site) (sites (values Remembered "Playable")))) if:(>= 1 (count at:(site))))) (< 1 (count at:(from))))})) (then (sow "TrackCCW" apply:(if (= 4 (count at:(to))) (and (if (is In (to) (expand (sites Corners))) (set Var "Blocked" (to)) (if (!= 0 (count at:(trackSite Move from:(to) "TrackCCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCCW" steps:1))))) (if (not (is In (to) (sites (values Remembered "Blocked")))) (fromTo (from (to)) (to (mapEntry Mover)) count:4))) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))))) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (not (is In (from) (sites (values Remembered "Blocked")))) (if (not (all Sites (forEach (sites Mover) if:(is In (site) (sites (values Remembered "Playable")))) if:(>= 1 (count at:(site))))) (< 1 (count at:(from))))})) (then (sow "TrackCW" apply:(if (= 4 (count at:(to))) (and (if (is In (to) (expand (sites Corners))) (set Var "Blocked" (to)) (if (!= 0 (count at:(trackSite Move from:(to) "TrackCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCW" steps:1))))) (if (not (is In (to) (sites (values Remembered "Blocked")))) (fromTo (from (to)) (to (mapEntry Mover)) count:4))) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))))) (then (if (no Moves Next) (and {(forEach Site (sites P1) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))) (forget Value "Playable" All) (forget Value "Blocked" All) (if (< (+ (count at:(mapEntry P1)) (count in:(sites P1))) (+ (count at:(mapEntry P2)) (count in:(sites P2)))) (and (set NextPlayer (player 2)) (set Var "Winner" 2)) (and (set NextPlayer (player 1)) (set Var "Winner" 1)))}))))) (end (if (no Moves Next) {(if (> 2 (count at:(mapEntry P1))) (result P2 Win)) (if (> 2 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (no Moves Next) "BetweenRounds")) (phase "BetweenRounds" (play (if (and (not (is Prev Mover)) (!= (mover) (var "Winner"))) (or (move (from (mapEntry Mover)) (to (if (is Mover P1) (intersection (sites Bottom) (expand (sites Right))) (intersection (sites Top) (expand (sites Left)))) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (if (> 4 (count at:(last To))) (and (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (mapEntry Next)) count:(- 4 (count at:(last To)))) (remember Value "Blocked" (last To)))) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending)) (set Var "Direction" 2)}))) (move (from (mapEntry Mover)) (to (if (is Mover P1) (intersection (sites Bottom) (expand (sites Left))) (intersection (sites Top) (expand (sites Right)))) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (if (> 4 (count at:(last To))) (and (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (mapEntry Next)) count:(- 4 (count at:(last To)))) (remember Value "Blocked" (last To)))) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending)) (set Var "Direction" 1)})))) (if (!= (mover) (var "Winner")) (move (from (mapEntry Mover)) (to (if (= (var "Direction") 1) (trackSite Move from:(last To) "TrackCCW" steps:1) (trackSite Move from:(last To) "TrackCW" steps:1)) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending))}))) (move (from (mapEntry Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (and (remember Value "Playable" (last To)) (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (moveAgain)))))))) (nextPhase (and (!= (var "Winner") (mover)) (= 0 (count at:(mapEntry Mover)))) "Sowing"))})) |
Two rows of six holes with stores on either end. Four counters in each hole. Players sow in an anti-clockwise direction. When the last counter falls into a hole, and it now contains two or three counters, these are captured. The game is played with 2 players. | (game "Kpo" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow apply:(if (or (= (count at:(to)) 2) (= (count at:(to)) 3)) (fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to)))))))) (end (if (no Moves Next) (byScore {(score P1 (+ (count in:(sites P1)) (count at:(mapEntry P1)))) (score P2 (+ (count in:(sites P2)) (count at:(mapEntry P2))))}))))) | ###Description
Two rows of six holes with stores on either end. Four counters in each hole. Players sow in an anti-clockwise direction. When the last counter falls into a hole, and it now contains two or three counters, these are captured. The game is played with 2 players.
###Ludii
(game "Kpo" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow apply:(if (or (= (count at:(to)) 2) (= (count at:(to)) 3)) (fromTo (from (to)) (to (mapEntry Mover)) count:(count at:(to)))))))) (end (if (no Moves Next) (byScore {(score P1 (+ (count in:(sites P1)) (count at:(mapEntry P1)))) (score P2 (+ (count in:(sites P2)) (count at:(mapEntry P2))))}))))) |
2x7 board. Seven counters in each hole. Sowing occurs in an anti-clockwise direction. When the final counter falls into an occupied hole, the contents of that hole are picked up and sowing continues. If the final counter falls into a hole containing one or three counters, the player captures those counters, plus any counters in the hole in the opposite row, as well as the contents of any holes in an unbroken sequence following the one in which the final counter which also contain two or four counters.When the final counter falls into an empty hole, the turn ends. Play continues until all of the pieces are captured. The player who captured the most counters wins. | (game "La'b Akila" (players 2) (equipment {(mancalaBoard 2 7 store:None (track "TrackCCW" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 7 to:(sites Track))) (play (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow if:True apply:(if (or (= 2 (count at:(to))) (= 4 (count at:(to)))) (and (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) (if (!= 0 (count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7)))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))))))) backtracking:(or (= 2 (count at:(to))) (= 4 (count at:(to)))))))) (end (if (>= 1 (count Pieces All in:(sites Board))) (byScore {(score P1 (+ (count in:(sites Mover)) (count Cell at:(handSite P1)))) (score P2 (+ (count in:(sites Mover)) (count Cell at:(handSite P2))))}))))) | ###Description
2x7 board. Seven counters in each hole. Sowing occurs in an anti-clockwise direction. When the final counter falls into an occupied hole, the contents of that hole are picked up and sowing continues. If the final counter falls into a hole containing one or three counters, the player captures those counters, plus any counters in the hole in the opposite row, as well as the contents of any holes in an unbroken sequence following the one in which the final counter which also contain two or four counters.When the final counter falls into an empty hole, the turn ends. Play continues until all of the pieces are captured. The player who captured the most counters wins.
###Ludii
(game "La'b Akila" (players 2) (equipment {(mancalaBoard 2 7 store:None (track "TrackCCW" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 7 to:(sites Track))) (play (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow if:True apply:(if (or (= 2 (count at:(to))) (= 4 (count at:(to)))) (and (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) (if (!= 0 (count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7)))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 7) (- (to) 7))))))) backtracking:(or (= 2 (count at:(to))) (= 4 (count at:(to)))))))) (end (if (>= 1 (count Pieces All in:(sites Board))) (byScore {(score P1 (+ (count in:(sites Mover)) (count Cell at:(handSite P1)))) (score P2 (+ (count in:(sites Mover)) (count Cell at:(handSite P2))))}))))) |
2x6 board. Four counters in each hole. The first player takes three counters from each of their holes, and sows them beginning in the opponent's first hole. Sowing proceeds in an anti-clockwise direction, and when the final counter lands in an occupied hole, these are picked up and sowing continues. While sowing, if a hole is made to contain four counters, these are captured by the player. When the final counter falls into an empty hole, the turn ends, unless the player was able to make a capture during the sowing, in which case they may play again. A player with no counters on their side must pass, and may continue playing when there are counters in their holes again. Play continues until all the counters are captured, and the player with the most counters wins. A second round is played, each player placing four counters into each hole starting from the rightmost hole in their row. The player with more counters gains a hole from their opponent for every four extra balls they've captured. If an opponent has three extra after counting in such a way, they also gain a hole, but not if there are one or two extra. Play continues in several rounds like this until one player captures all the holes. | (game "Lam Waladach" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Opening" (play (move Select (from 11) (then (and (forEach Site (sites Mover) (fromTo (from (site)) (to 11) count:3)) (sow count:18 "TrackCCW" apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to)))) origin:True))))) (nextPhase "Sowing")) (phase "Sowing" (play (or {(move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(> (count at:(from)) 0)) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow "TrackCCW" apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(var "NumSowed"))) (if (= 4 (count at:(site))) (and (fromTo (from (site)) (to (handSite Mover)) count:4) (and (moveAgain) (set Pending))))) (set Var "NumSowed" 0))))))} (then (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (and (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 3 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 3 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 3 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:(if (>= (count Cell at:(handSite Mover)) 4) 4 3) (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x6 board. Four counters in each hole. The first player takes three counters from each of their holes, and sows them beginning in the opponent's first hole. Sowing proceeds in an anti-clockwise direction, and when the final counter lands in an occupied hole, these are picked up and sowing continues. While sowing, if a hole is made to contain four counters, these are captured by the player. When the final counter falls into an empty hole, the turn ends, unless the player was able to make a capture during the sowing, in which case they may play again. A player with no counters on their side must pass, and may continue playing when there are counters in their holes again. Play continues until all the counters are captured, and the player with the most counters wins. A second round is played, each player placing four counters into each hole starting from the rightmost hole in their row. The player with more counters gains a hole from their opponent for every four extra balls they've captured. If an opponent has three extra after counting in such a way, they also gain a hole, but not if there are one or two extra. Play continues in several rounds like this until one player captures all the holes.
###Ludii
(game "Lam Waladach" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Opening" (play (move Select (from 11) (then (and (forEach Site (sites Mover) (fromTo (from (site)) (to 11) count:3)) (sow count:18 "TrackCCW" apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to)))) origin:True))))) (nextPhase "Sowing")) (phase "Sowing" (play (or {(move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(> (count at:(from)) 0)) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow "TrackCCW" apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(var "NumSowed"))) (if (= 4 (count at:(site))) (and (fromTo (from (site)) (to (handSite Mover)) count:4) (and (moveAgain) (set Pending))))) (set Var "NumSowed" 0))))))} (then (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (and (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 3 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 3 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 3 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:(if (>= (count Cell at:(handSite Mover)) 4) 4 3) (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))))))) (nextPhase (all Passed) "Sowing"))})) |
2x6 board. Four counters in each hole. Play begins with a stylized move. One player takes one counter from their rightmost hole, and holds it in their hand. They then take one counter from the next hole, moving in an anti-clockwise direction, and place it in the next hole. They then take a counter from the next hole after that, and placing it in the next hole, continuing until there is an alternating pattern of a hole with five counters followed by a hole with three counters. Upon reaching the original hole, one counter is dropping in it, and then one counter in the following hole, thus capturing the counters in this hole. Players then alternate turns, sowing in an anti-clockwise direction. When the final counter of a sowing lands in an occupied hole, these counters are picked up and the sowing continues. During sowing, the contents of any hole made to contain four counters are captured by the player in whose row the hole is located, except when this is the final counter of a sowing, in which case the player who is sowing captures these counters. When the sowing ends in an empty hole, the turn ends. Play continues until one player cannot move, and the other player captures the remaining counters. A second round is played, each player placing four counters into each hole starting from the rightmost hole in their row. The player with more counters gains a hole from their opponent for every four extra balls they've captured. If an opponent has three extra after counting in such a way, they also gain a hole, but not if there are one or two extra. Play continues in several rounds like this until one player captures all the holes. | (game "Lamosh" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Opening1" (play (move (from (if (is Prev Mover) (var "Replay") 11)) (to (trackSite Move from:(from) "Track" steps:1)) (then (if (!= (trackSite Move from:(last To) "Track" steps:1) 11) (and (moveAgain) (set Var "Replay" (trackSite Move from:(last To) "Track" steps:1))) (fromTo (from 11) (to (handSite Mover)) count:(count at:11)))))) (nextPhase (not (is Next Mover)) "Sowing")) (phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow "TrackCCW" apply:(if (= 4 (count at:(to))) (fromTo (from (to)) (to (handSite Mover)) count:4) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to)))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(- (var "NumSowed") 1))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (if (is In (to) (sites (values Remembered "OwnedP1"))) (handSite P1) (handSite P2))) count:4))) (set Var "NumSowed" 0))))))} (then (if (and (not (is Next Mover)) (or (all Sites (sites (values Remembered "OwnedP1")) if:(is Empty (site))) (all Sites (sites (values Remembered "OwnedP2")) if:(is Empty (site))))) (and {(if (no Moves P1) (forEach Site (sites Board) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites Board) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 3 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 3 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 3 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:(if (>= (count Cell at:(handSite Mover)) 4) 4 3) (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x6 board. Four counters in each hole. Play begins with a stylized move. One player takes one counter from their rightmost hole, and holds it in their hand. They then take one counter from the next hole, moving in an anti-clockwise direction, and place it in the next hole. They then take a counter from the next hole after that, and placing it in the next hole, continuing until there is an alternating pattern of a hole with five counters followed by a hole with three counters. Upon reaching the original hole, one counter is dropping in it, and then one counter in the following hole, thus capturing the counters in this hole. Players then alternate turns, sowing in an anti-clockwise direction. When the final counter of a sowing lands in an occupied hole, these counters are picked up and the sowing continues. During sowing, the contents of any hole made to contain four counters are captured by the player in whose row the hole is located, except when this is the final counter of a sowing, in which case the player who is sowing captures these counters. When the sowing ends in an empty hole, the turn ends. Play continues until one player cannot move, and the other player captures the remaining counters. A second round is played, each player placing four counters into each hole starting from the rightmost hole in their row. The player with more counters gains a hole from their opponent for every four extra balls they've captured. If an opponent has three extra after counting in such a way, they also gain a hole, but not if there are one or two extra. Play continues in several rounds like this until one player captures all the holes.
###Ludii
(game "Lamosh" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Opening1" (play (move (from (if (is Prev Mover) (var "Replay") 11)) (to (trackSite Move from:(from) "Track" steps:1)) (then (if (!= (trackSite Move from:(last To) "Track" steps:1) 11) (and (moveAgain) (set Var "Replay" (trackSite Move from:(last To) "Track" steps:1))) (fromTo (from 11) (to (handSite Mover)) count:(count at:11)))))) (nextPhase (not (is Next Mover)) "Sowing")) (phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow "TrackCCW" apply:(if (= 4 (count at:(to))) (fromTo (from (to)) (to (handSite Mover)) count:4) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to)))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(- (var "NumSowed") 1))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (if (is In (to) (sites (values Remembered "OwnedP1"))) (handSite P1) (handSite P2))) count:4))) (set Var "NumSowed" 0))))))} (then (if (and (not (is Next Mover)) (or (all Sites (sites (values Remembered "OwnedP1")) if:(is Empty (site))) (all Sites (sites (values Remembered "OwnedP2")) if:(is Empty (site))))) (and {(if (no Moves P1) (forEach Site (sites Board) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites Board) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 3 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 3 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 3 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:(if (>= (count Cell at:(handSite Mover)) 4) 4 3) (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))))))) (nextPhase (all Passed) "Sowing"))})) |
2x5 board. Five counters per hole. Each player has a larger stone, which they place in any hole on their side of the board. Sowing proceeds in either direction, the first player chooses which and all sowing for the rest of the game proceeds in that direction. Players may sow from any hole on the board. If the last counter falls into a hole with counters, the counters in the next hole are picked up and sowing continues, and if this hole is empty, the counters in the hole following the empty hole are captured. If there is an unbroken sequence of alternating empty and occupied holes, the counters in the occupied holes are captured until there are two empty or two occupied holes. If the final counter falls into an empty hole the turn ends. Also, if a large stone is dropped into an occupied hole during sowing, the contents of that hole are captured by the owner of the large stone, even if it is not the current player. If a player captures the other player's large stone, it is kept by the capturing player in subsequent rounds until it is captured. The game ends when one player's holes are empty, the opponent claiming the remainder of the counters. The players then attempt to fill all of the holes on their side of the board with either five counters or the large stone. Both large stones must be used to fill holes. Any holes that cannot be filled with five counters or a large stone are left empty, but may be sown into and played from as normal. Play continues in this fashion until one player cannot fill any holes. | (game "Laomuzhu" (players 2) (equipment {(mancalaBoard 2 5 store:None largeStack:True {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "4,W,N,E" loop:True)}) (piece "Seed" Shared) (piece "Ball" P1) (piece "Ball" P2) (hand Each size:2) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 0) (pair P2 9)})}) (rules (start {(place Stack "Seed" (union (sites Bottom) (sites Top)) count:5) (place Stack "Ball1" (handSite P1 1)) (place Stack "Ball2" (handSite P2 1))}) phases:{(phase "Placement" (play (if (is Occupied Cell (handSite Mover 1)) (move (from Cell (handSite Mover 1) level:(topLevel Cell at:(handSite Mover 1))) (to (sites Mover)) stack:True))) (nextPhase Mover (is Empty Cell (handSite Mover 1)) "Sowing")) (phase "Sowing" (play (or {(if (!= (var "Direction") 2) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(!= 0 (size Stack at:(from)))) (then (and {(forEach Value min:1 max:(size Stack at:(last From)) (if (= (id "Seed" Shared) (what at:(last From) level:(- (size Stack at:(last From)) (value)))) (fromTo (from (last From) level:(- (size Stack at:(last From)) (value))) (to (trackSite Move from:(last From) "TrackCCW" steps:(value))) stack:True) (and (if (and (is Occupied (trackSite Move from:(last From) "TrackCCW" steps:(value))) (!= (trackSite Move from:(last From) "TrackCCW" steps:(value)) (last From))) (if (= (who at:(last From) level:(- (size Stack at:(last From)) (value))) P1) (forEach Level (trackSite Move from:(last From) "TrackCCW" steps:(value)) FromTop (if (= (id "Seed" Shared) (what at:(trackSite Move from:(last From) "TrackCCW" steps:(value)) level:(level))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:(value)) level:(level)) (to (handSite P1))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:(value)) level:(level)) (to (handSite P1 1))))) (forEach Level (trackSite Move from:(last From) "TrackCCW" steps:(value)) FromTop (if (= (id "Seed" Shared) (what at:(trackSite Move from:(last From) "TrackCCW" steps:(value)) level:(level))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:(value)) level:(level)) (to (handSite P2))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:(value)) level:(level)) (to (handSite P2 1))))))) (fromTo (from (last From) level:(- (size Stack at:(last From)) (value))) (to (trackSite Move from:(last From) "TrackCCW" steps:(value))) stack:True)))) (if (< (var "Direction") 1) (set Var "Direction" 1)) (if (< (size Stack at:(last From)) 8) (if (!= 0 (size Stack at:(trackSite Move from:(last From) "TrackCCW" steps:(+ 1 (size Stack at:(last From)))))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(last From) "TrackCCW" steps:(+ 1 (size Stack at:(last From)))))) (if (is Occupied (trackSite Move from:(last From) "TrackCCW" steps:(+ 2 (size Stack at:(last From))))) (forEach Level (trackSite Move from:(last From) "TrackCCW" steps:(+ 2 (size Stack at:(last From)))) FromTop (if (= (id "Seed" Shared) (what at:(trackSite Move from:(last From) "TrackCCW" steps:(+ 2 (size Stack at:(last From)))) level:(level))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:(+ 2 (size Stack at:(last From)))) level:(level)) (to (handSite Mover))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:(+ 2 (size Stack at:(last From)))) level:(level)) (to (handSite Mover 1))))))))})))) (if (!= (var "Direction") 1) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(!= 0 (size Stack at:(from)))) (then (and {(forEach Value min:1 max:(size Stack at:(last From)) (if (= (id "Seed" Shared) (what at:(last From) level:(- (size Stack at:(last From)) (value)))) (fromTo (from (last From) level:(- (size Stack at:(last From)) (value))) (to (trackSite Move from:(last From) "TrackCW" steps:(value))) stack:True) (and (if (and (is Occupied (trackSite Move from:(last From) "TrackCW" steps:(value))) (!= (trackSite Move from:(last From) "TrackCW" steps:(value)) (last From))) (if (= (who at:(last From) level:(- (size Stack at:(last From)) (value))) P1) (forEach Level (trackSite Move from:(last From) "TrackCW" steps:(value)) FromTop (if (= (id "Seed" Shared) (what at:(trackSite Move from:(last From) "TrackCW" steps:(value)) level:(level))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:(value)) level:(level)) (to (handSite P1))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:(value)) level:(level)) (to (handSite P1 1))))) (forEach Level (trackSite Move from:(last From) "TrackCW" steps:(value)) FromTop (if (= (id "Seed" Shared) (what at:(trackSite Move from:(last From) "TrackCW" steps:(value)) level:(level))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:(value)) level:(level)) (to (handSite P2))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:(value)) level:(level)) (to (handSite P2 1))))))) (fromTo (from (last From) level:(- (size Stack at:(last From)) (value))) (to (trackSite Move from:(last From) "TrackCW" steps:(value))) stack:True)))) (if (< (var "Direction") 1) (set Var "Direction" 2)) (if (< (size Stack at:(last From)) 8) (if (!= 0 (size Stack at:(trackSite Move from:(last From) "TrackCW" steps:(+ 1 (size Stack at:(last From)))))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(last From) "TrackCW" steps:(+ 1 (size Stack at:(last From)))))) (if (is Occupied (trackSite Move from:(last From) "TrackCW" steps:(+ 2 (size Stack at:(last From))))) (forEach Level (trackSite Move from:(last From) "TrackCW" steps:(+ 2 (size Stack at:(last From)))) FromTop (if (= (id "Seed" Shared) (what at:(trackSite Move from:(last From) "TrackCW" steps:(+ 2 (size Stack at:(last From)))) level:(level))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:(+ 2 (size Stack at:(last From)))) level:(level)) (to (handSite Mover))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:(+ 2 (size Stack at:(last From)))) level:(level)) (to (handSite Mover 1))))))))}))))} (then (if (all Sites (sites P1) if:(= 0 (count at:(site)))) (forEach Site (sites Board) (if (is Occupied (site)) (forEach Level (site) FromTop (if (= (id "Seed" Shared) (what at:(site) level:(level))) (fromTo (from (site) level:(level)) (to (handSite P1)) stack:True) (fromTo (from (site) level:(level)) (to (handSite P1 1)) stack:True))))) (if (all Sites (sites P2) if:(= 0 (count at:(site)))) (forEach Site (sites Board) (if (is Occupied (site)) (forEach Level (site) FromTop (if (= (id "Seed" Shared) (what at:(site) level:(level))) (fromTo (from (site) level:(level)) (to (handSite P2)) stack:True) (fromTo (from (site) level:(level)) (to (handSite P2 1)) stack:True)))))))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (and (> 5 (size Stack Cell at:(handSite P1))) (= 0 (size Stack Cell at:(handSite P1 1)))) (result P2 Win)) (if (and (> 5 (size Stack Cell at:(handSite P2))) (= 0 (size Stack Cell at:(handSite P2 1)))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (or (if (<= 5 (size Stack Cell at:(handSite Mover))) (move Select (from Cell (handSite Mover)) (to (trackSite FirstSite "TrackCCW" from:(mapEntry Mover) if:(is Empty (to)))) (then (forEach Value min:1 max:5 (fromTo (from Cell (last From) level:(- (size Stack Cell at:(last From)) (value))) (to (last To)) stack:True))))) (if (!= 0 (size Stack Cell at:(handSite Mover 1))) (move Select (from Cell (handSite Mover 1)) (to (sites Mover)) (then (fromTo (from Cell (last From) level:(topLevel Cell at:(last From))) (to (last To)) stack:True)))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x5 board. Five counters per hole. Each player has a larger stone, which they place in any hole on their side of the board. Sowing proceeds in either direction, the first player chooses which and all sowing for the rest of the game proceeds in that direction. Players may sow from any hole on the board. If the last counter falls into a hole with counters, the counters in the next hole are picked up and sowing continues, and if this hole is empty, the counters in the hole following the empty hole are captured. If there is an unbroken sequence of alternating empty and occupied holes, the counters in the occupied holes are captured until there are two empty or two occupied holes. If the final counter falls into an empty hole the turn ends. Also, if a large stone is dropped into an occupied hole during sowing, the contents of that hole are captured by the owner of the large stone, even if it is not the current player. If a player captures the other player's large stone, it is kept by the capturing player in subsequent rounds until it is captured. The game ends when one player's holes are empty, the opponent claiming the remainder of the counters. The players then attempt to fill all of the holes on their side of the board with either five counters or the large stone. Both large stones must be used to fill holes. Any holes that cannot be filled with five counters or a large stone are left empty, but may be sown into and played from as normal. Play continues in this fashion until one player cannot fill any holes.
###Ludii
(game "Laomuzhu" (players 2) (equipment {(mancalaBoard 2 5 store:None largeStack:True {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "4,W,N,E" loop:True)}) (piece "Seed" Shared) (piece "Ball" P1) (piece "Ball" P2) (hand Each size:2) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 0) (pair P2 9)})}) (rules (start {(place Stack "Seed" (union (sites Bottom) (sites Top)) count:5) (place Stack "Ball1" (handSite P1 1)) (place Stack "Ball2" (handSite P2 1))}) phases:{(phase "Placement" (play (if (is Occupied Cell (handSite Mover 1)) (move (from Cell (handSite Mover 1) level:(topLevel Cell at:(handSite Mover 1))) (to (sites Mover)) stack:True))) (nextPhase Mover (is Empty Cell (handSite Mover 1)) "Sowing")) (phase "Sowing" (play (or {(if (!= (var "Direction") 2) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(!= 0 (size Stack at:(from)))) (then (and {(forEach Value min:1 max:(size Stack at:(last From)) (if (= (id "Seed" Shared) (what at:(last From) level:(- (size Stack at:(last From)) (value)))) (fromTo (from (last From) level:(- (size Stack at:(last From)) (value))) (to (trackSite Move from:(last From) "TrackCCW" steps:(value))) stack:True) (and (if (and (is Occupied (trackSite Move from:(last From) "TrackCCW" steps:(value))) (!= (trackSite Move from:(last From) "TrackCCW" steps:(value)) (last From))) (if (= (who at:(last From) level:(- (size Stack at:(last From)) (value))) P1) (forEach Level (trackSite Move from:(last From) "TrackCCW" steps:(value)) FromTop (if (= (id "Seed" Shared) (what at:(trackSite Move from:(last From) "TrackCCW" steps:(value)) level:(level))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:(value)) level:(level)) (to (handSite P1))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:(value)) level:(level)) (to (handSite P1 1))))) (forEach Level (trackSite Move from:(last From) "TrackCCW" steps:(value)) FromTop (if (= (id "Seed" Shared) (what at:(trackSite Move from:(last From) "TrackCCW" steps:(value)) level:(level))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:(value)) level:(level)) (to (handSite P2))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:(value)) level:(level)) (to (handSite P2 1))))))) (fromTo (from (last From) level:(- (size Stack at:(last From)) (value))) (to (trackSite Move from:(last From) "TrackCCW" steps:(value))) stack:True)))) (if (< (var "Direction") 1) (set Var "Direction" 1)) (if (< (size Stack at:(last From)) 8) (if (!= 0 (size Stack at:(trackSite Move from:(last From) "TrackCCW" steps:(+ 1 (size Stack at:(last From)))))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(last From) "TrackCCW" steps:(+ 1 (size Stack at:(last From)))))) (if (is Occupied (trackSite Move from:(last From) "TrackCCW" steps:(+ 2 (size Stack at:(last From))))) (forEach Level (trackSite Move from:(last From) "TrackCCW" steps:(+ 2 (size Stack at:(last From)))) FromTop (if (= (id "Seed" Shared) (what at:(trackSite Move from:(last From) "TrackCCW" steps:(+ 2 (size Stack at:(last From)))) level:(level))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:(+ 2 (size Stack at:(last From)))) level:(level)) (to (handSite Mover))) (fromTo (from (trackSite Move from:(last From) "TrackCCW" steps:(+ 2 (size Stack at:(last From)))) level:(level)) (to (handSite Mover 1))))))))})))) (if (!= (var "Direction") 1) (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(!= 0 (size Stack at:(from)))) (then (and {(forEach Value min:1 max:(size Stack at:(last From)) (if (= (id "Seed" Shared) (what at:(last From) level:(- (size Stack at:(last From)) (value)))) (fromTo (from (last From) level:(- (size Stack at:(last From)) (value))) (to (trackSite Move from:(last From) "TrackCW" steps:(value))) stack:True) (and (if (and (is Occupied (trackSite Move from:(last From) "TrackCW" steps:(value))) (!= (trackSite Move from:(last From) "TrackCW" steps:(value)) (last From))) (if (= (who at:(last From) level:(- (size Stack at:(last From)) (value))) P1) (forEach Level (trackSite Move from:(last From) "TrackCW" steps:(value)) FromTop (if (= (id "Seed" Shared) (what at:(trackSite Move from:(last From) "TrackCW" steps:(value)) level:(level))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:(value)) level:(level)) (to (handSite P1))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:(value)) level:(level)) (to (handSite P1 1))))) (forEach Level (trackSite Move from:(last From) "TrackCW" steps:(value)) FromTop (if (= (id "Seed" Shared) (what at:(trackSite Move from:(last From) "TrackCW" steps:(value)) level:(level))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:(value)) level:(level)) (to (handSite P2))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:(value)) level:(level)) (to (handSite P2 1))))))) (fromTo (from (last From) level:(- (size Stack at:(last From)) (value))) (to (trackSite Move from:(last From) "TrackCW" steps:(value))) stack:True)))) (if (< (var "Direction") 1) (set Var "Direction" 2)) (if (< (size Stack at:(last From)) 8) (if (!= 0 (size Stack at:(trackSite Move from:(last From) "TrackCW" steps:(+ 1 (size Stack at:(last From)))))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(last From) "TrackCW" steps:(+ 1 (size Stack at:(last From)))))) (if (is Occupied (trackSite Move from:(last From) "TrackCW" steps:(+ 2 (size Stack at:(last From))))) (forEach Level (trackSite Move from:(last From) "TrackCW" steps:(+ 2 (size Stack at:(last From)))) FromTop (if (= (id "Seed" Shared) (what at:(trackSite Move from:(last From) "TrackCW" steps:(+ 2 (size Stack at:(last From)))) level:(level))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:(+ 2 (size Stack at:(last From)))) level:(level)) (to (handSite Mover))) (fromTo (from (trackSite Move from:(last From) "TrackCW" steps:(+ 2 (size Stack at:(last From)))) level:(level)) (to (handSite Mover 1))))))))}))))} (then (if (all Sites (sites P1) if:(= 0 (count at:(site)))) (forEach Site (sites Board) (if (is Occupied (site)) (forEach Level (site) FromTop (if (= (id "Seed" Shared) (what at:(site) level:(level))) (fromTo (from (site) level:(level)) (to (handSite P1)) stack:True) (fromTo (from (site) level:(level)) (to (handSite P1 1)) stack:True))))) (if (all Sites (sites P2) if:(= 0 (count at:(site)))) (forEach Site (sites Board) (if (is Occupied (site)) (forEach Level (site) FromTop (if (= (id "Seed" Shared) (what at:(site) level:(level))) (fromTo (from (site) level:(level)) (to (handSite P2)) stack:True) (fromTo (from (site) level:(level)) (to (handSite P2 1)) stack:True)))))))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (and (> 5 (size Stack Cell at:(handSite P1))) (= 0 (size Stack Cell at:(handSite P1 1)))) (result P2 Win)) (if (and (> 5 (size Stack Cell at:(handSite P2))) (= 0 (size Stack Cell at:(handSite P2 1)))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (or (if (<= 5 (size Stack Cell at:(handSite Mover))) (move Select (from Cell (handSite Mover)) (to (trackSite FirstSite "TrackCCW" from:(mapEntry Mover) if:(is Empty (to)))) (then (forEach Value min:1 max:5 (fromTo (from Cell (last From) level:(- (size Stack Cell at:(last From)) (value))) (to (last To)) stack:True))))) (if (!= 0 (size Stack Cell at:(handSite Mover 1))) (move Select (from Cell (handSite Mover 1)) (to (sites Mover)) (then (fromTo (from Cell (last From) level:(topLevel Cell at:(last From))) (to (last To)) stack:True)))))) (nextPhase (all Passed) "Sowing"))})) |
2x6 board. Five counters in each hole. Play begins from any hole in a player's row and sown anti-clockwise. When the final counter falls into an occupied hole, the counters in that hole are picked up and sowing continues. If the final counter falls into an empty hole, the turn ends; if this hole is in the player's own row, the contents of the opponent's hole are captured if they contain one, two, four, or more counters. If it contains three counters, one of the opponent's counters is taken and placed into the hole where sowing ended, so that each now has two counters. These holes cannot be sown from for the rest of the game and are owned by the player whose turn created them. Players cannot change their move mid-turn and counting of counters is forbidden. Play ends when one player can no longer play. The opponent then takes all of the counters in their own row, and each player takes the counters that have accumulated in their captured holes. A new game begins. The player with the fewest counters arranges them in their holes, distributing them as equally as possible. The opponent then mirrors this arrangement in their holes, placing aside any extras for use in subsequent games. If the player is reduced to four counters or less, these are arranged one to a hole and any empty holes are not used for the game (by either player). The player who captures all the counters wins. | (game "Leyla Gobale (Gabradarre)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "TrackCCW" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each) (map "CorrespondingHoles" {(pair 0 11) (pair 1 10) (pair 2 9) (pair 3 8) (pair 4 7) (pair 5 6) (pair 6 5) (pair 7 4) (pair 8 3) (pair 9 2) (pair 10 1) (pair 11 0)})}) (rules (start {(set RememberValue "Playable" (union (sites Top) (sites Bottom))) (set Count 5 to:(sites Track))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (= 0 (state at:(from))) (is In (from) (sites (values Remembered "Playable")))})) (then (sow apply:(if (< 1 (count at:(to))) (if (= 0 (state at:(to))) (and (moveAgain) (set Var "Replay" (to)))) (if (is In (to) (sites Mover)) (if (!= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))) (if (!= 0 (count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))))) (and {(fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (to)) count:1) (set State at:(to) (mover)) (set State at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)) (mover))})))))))} (then (if (and (not (is Next Mover)) (or (all Sites (sites P1) if:(or (not (is In (site) (sites (values Remembered "Playable")))) (or (!= 0 (state at:(site))) (is Empty (site))))) (all Sites (sites P2) if:(or (not (is In (site) (sites (values Remembered "Playable")))) (or (!= 0 (state at:(site))) (is Empty (site))))))) (and {(forEach Site (sites P1) (if (= 0 (state at:(site))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (= 0 (state at:(site))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forEach Site (sites Board) (if (= (state at:(site)) P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))) (if (= (state at:(site)) P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))))) (if (< (+ {(count Cell at:(handSite P1)) (count in:(forEach (sites Board) if:(= (state at:(site)) P1))) (count in:(forEach (sites P1) if:(= (state at:(site)) 0)))}) (+ {(count Cell at:(handSite P2)) (count in:(forEach (sites Board) if:(= (state at:(site)) P2))) (count in:(forEach (sites P2) if:(= (state at:(site)) 0)))})) (set NextPlayer (player 1)) (set NextPlayer (player 2))) (forget Value "Playable" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (move (from (handSite Mover)) (to (forEach (sites Mover) if:(= (count at:(site)) (min (results from:(sites Mover) to:(sites Mover) (count at:(to))))))) count:1 (then (and (remember Value "Playable" (last To) unique:True) (if (< 0 (count Cell at:(handSite Mover))) (moveAgain) (forEach Site (sites Mover) (if (is Occupied (site)) (fromTo (from (handSite Next)) (to (mapEntry "CorrespondingHoles" (site))) count:(count at:(site)))))))))) (nextPhase (or (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) | ###Description
2x6 board. Five counters in each hole. Play begins from any hole in a player's row and sown anti-clockwise. When the final counter falls into an occupied hole, the counters in that hole are picked up and sowing continues. If the final counter falls into an empty hole, the turn ends; if this hole is in the player's own row, the contents of the opponent's hole are captured if they contain one, two, four, or more counters. If it contains three counters, one of the opponent's counters is taken and placed into the hole where sowing ended, so that each now has two counters. These holes cannot be sown from for the rest of the game and are owned by the player whose turn created them. Players cannot change their move mid-turn and counting of counters is forbidden. Play ends when one player can no longer play. The opponent then takes all of the counters in their own row, and each player takes the counters that have accumulated in their captured holes. A new game begins. The player with the fewest counters arranges them in their holes, distributing them as equally as possible. The opponent then mirrors this arrangement in their holes, placing aside any extras for use in subsequent games. If the player is reduced to four counters or less, these are arranged one to a hole and any empty holes are not used for the game (by either player). The player who captures all the counters wins.
###Ludii
(game "Leyla Gobale (Gabradarre)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "TrackCCW" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each) (map "CorrespondingHoles" {(pair 0 11) (pair 1 10) (pair 2 9) (pair 3 8) (pair 4 7) (pair 5 6) (pair 6 5) (pair 7 4) (pair 8 3) (pair 9 2) (pair 10 1) (pair 11 0)})}) (rules (start {(set RememberValue "Playable" (union (sites Top) (sites Bottom))) (set Count 5 to:(sites Track))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (= 0 (state at:(from))) (is In (from) (sites (values Remembered "Playable")))})) (then (sow apply:(if (< 1 (count at:(to))) (if (= 0 (state at:(to))) (and (moveAgain) (set Var "Replay" (to)))) (if (is In (to) (sites Mover)) (if (!= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))) (if (!= 0 (count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))))) (and {(fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (to)) count:1) (set State at:(to) (mover)) (set State at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)) (mover))})))))))} (then (if (and (not (is Next Mover)) (or (all Sites (sites P1) if:(or (not (is In (site) (sites (values Remembered "Playable")))) (or (!= 0 (state at:(site))) (is Empty (site))))) (all Sites (sites P2) if:(or (not (is In (site) (sites (values Remembered "Playable")))) (or (!= 0 (state at:(site))) (is Empty (site))))))) (and {(forEach Site (sites P1) (if (= 0 (state at:(site))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (= 0 (state at:(site))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forEach Site (sites Board) (if (= (state at:(site)) P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))) (if (= (state at:(site)) P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))))) (if (< (+ {(count Cell at:(handSite P1)) (count in:(forEach (sites Board) if:(= (state at:(site)) P1))) (count in:(forEach (sites P1) if:(= (state at:(site)) 0)))}) (+ {(count Cell at:(handSite P2)) (count in:(forEach (sites Board) if:(= (state at:(site)) P2))) (count in:(forEach (sites P2) if:(= (state at:(site)) 0)))})) (set NextPlayer (player 1)) (set NextPlayer (player 2))) (forget Value "Playable" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (move (from (handSite Mover)) (to (forEach (sites Mover) if:(= (count at:(site)) (min (results from:(sites Mover) to:(sites Mover) (count at:(to))))))) count:1 (then (and (remember Value "Playable" (last To) unique:True) (if (< 0 (count Cell at:(handSite Mover))) (moveAgain) (forEach Site (sites Mover) (if (is Occupied (site)) (fromTo (from (handSite Next)) (to (mapEntry "CorrespondingHoles" (site))) count:(count at:(site)))))))))) (nextPhase (or (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) |
2x6, 8, or 12 holes. Four counters in each hole. Play begins from a player's righthand hole and counters are sown clockwise. After this, a player may begin sowing from any hole in their row. When the final counter falls into an occupied hole, the counters in that hole are picked up and sowing continues. If the final counter falls into an empty hole, the turn ends; if this hole is in the player's own row, the contents of the opponent's hole are captured if they contain one, two, four, or more counters. If it contains three counters, one of the opponent's counters is taken and placed into the hole where sowing ended, so that each now has two counters. These holes cannot be sown from for the rest of the game and are owned by the player whose turn created them. Play ends when one player can no longer play. The opponent then takes all of the counters in their own row, and each player takes the counters that have accumulated in their captured holes. The player with the most counters wins. Each player has 6 holes. | (game "Leyla Gobale (Somaliland)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "5,W,N,E" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (or {(move Select (from (if (= 0 (count Moves)) (sites {5}) (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover))) if:(and (is Occupied (from)) (= 0 (state at:(from))))) (then (sow apply:(if (< 1 (count at:(to))) (if (= 0 (state at:(to))) (and (moveAgain) (set Var "Replay" (to)))) (if (is In (to) (sites Mover)) (if (!= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))) (if (!= 0 (count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))))) (and {(fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (to)) count:1) (set State at:(to) (mover)) (set State at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)) (mover))})))))))} (then (if (and (not (is Next Mover)) (or (all Sites (sites P1) if:(or (!= 0 (state at:(site))) (is Empty (site)))) (all Sites (sites P2) if:(or (!= 0 (state at:(site))) (is Empty (site)))))) (and {(forEach Site (sites P1) (if (= 0 (state at:(site))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (= 0 (state at:(site))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forEach Site (sites Board) (if (= (state at:(site)) P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))) (if (= (state at:(site)) P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))))}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) | ###Description
2x6, 8, or 12 holes. Four counters in each hole. Play begins from a player's righthand hole and counters are sown clockwise. After this, a player may begin sowing from any hole in their row. When the final counter falls into an occupied hole, the counters in that hole are picked up and sowing continues. If the final counter falls into an empty hole, the turn ends; if this hole is in the player's own row, the contents of the opponent's hole are captured if they contain one, two, four, or more counters. If it contains three counters, one of the opponent's counters is taken and placed into the hole where sowing ended, so that each now has two counters. These holes cannot be sown from for the rest of the game and are owned by the player whose turn created them. Play ends when one player can no longer play. The opponent then takes all of the counters in their own row, and each player takes the counters that have accumulated in their captured holes. The player with the most counters wins. Each player has 6 holes.
###Ludii
(game "Leyla Gobale (Somaliland)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "5,W,N,E" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (or {(move Select (from (if (= 0 (count Moves)) (sites {5}) (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover))) if:(and (is Occupied (from)) (= 0 (state at:(from))))) (then (sow apply:(if (< 1 (count at:(to))) (if (= 0 (state at:(to))) (and (moveAgain) (set Var "Replay" (to)))) (if (is In (to) (sites Mover)) (if (!= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))) (if (!= 0 (count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))))) (and {(fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (to)) count:1) (set State at:(to) (mover)) (set State at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)) (mover))})))))))} (then (if (and (not (is Next Mover)) (or (all Sites (sites P1) if:(or (!= 0 (state at:(site))) (is Empty (site)))) (all Sites (sites P2) if:(or (!= 0 (state at:(site))) (is Empty (site)))))) (and {(forEach Site (sites P1) (if (= 0 (state at:(site))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (= 0 (state at:(site))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forEach Site (sites Board) (if (= (state at:(site)) P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))) (if (= (state at:(site)) P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))))}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) |
2x6 board. Four counters in each hole. Sowing occurs in a clockwise direction. When the final counter of a sowing lands in an occupied hole, the contents of the hole are picked up and sowing continues. If this occupied hole is in the opponent's row and is made to contain four with the final counter, this hole and the one opposite it are captured, the counters remaining in the holes. Players may not sow from these holes. If on a subsequent turn the final counter of a sowing falls into an opponent's captured hole, one counter from the hole is captured, as well as the final counter of the sowing, and the turn ends. When the final counter of a sowing lands in an empty hole, the turn ends. Play continues until one of the players can no longer move, the opponent taking any remaining counters in free holes on their side of the board and each player taking the counters in their captured holes. A new round begins. Players attempt to fill their holes with four counters each. If a player has two extra counters, they may loan them to the other player, to be repaid when they can in a subsequent round. If a player has one extra counter, it is surrendered to the opponent. The player with more counter would only fill as many hole as the opponent is able to fill, retaining their extra counters for future rounds. Play continues until one player cannot fill any holes. | (game "Leyla" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "5,W,N,E" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(and (is Occupied (from)) (= 0 (state at:(from))))) (then (sow apply:(if (!= 0 (state at:(to))) (if (= (next) (state at:(to))) (and (fromTo (from (to)) (to (handSite Mover)) count:(min 2 (count at:(to)))) (set State at:(to) (next)))) (if (and (is In (to) (sites Next)) (= 4 (count at:(to)))) (and (set State at:(to) (mover)) (set State at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)) (mover))) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to)))))))))} (then (if (and (not (is Next Mover)) (or (all Sites (sites P1) if:(or (!= 0 (state at:(site))) (is Empty (site)))) (all Sites (sites P2) if:(or (!= 0 (state at:(site))) (is Empty (site)))))) (and {(forEach Site (sites P1) (if (= 0 (state at:(site))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (= 0 (state at:(site))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forEach Site (sites Board) (if (= (state at:(site)) P1) (and (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))) (set State at:(site) 0)) (if (= (state at:(site)) P2) (and (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))) (set State at:(site) 0)))))}))))) (end (if (no Pieces All in:(sites Board)) {(if (> 3 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 3 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (no Pieces All in:(sites Board)) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (if (= 1 (count Cell at:(handSite Mover))) (fromTo (from (handSite Mover)) (to (handSite Next)) count:1) (if (= 2 (count Cell at:(handSite Mover))) (fromTo (from (handSite Next)) (to (handSite Mover)) count:2) (if (= 3 (count Cell at:(handSite Mover))) (fromTo (from (handSite Next)) (to (handSite Mover)) count:1)))))))) (nextPhase (and (= (count Sites in:(forEach (sites P1) if:(is Occupied (site)))) (count Sites in:(forEach (sites P2) if:(is Occupied (site))))) (or (is Empty (handSite P1)) (is Empty (handSite P2)))) "Sowing"))})) | ###Description
2x6 board. Four counters in each hole. Sowing occurs in a clockwise direction. When the final counter of a sowing lands in an occupied hole, the contents of the hole are picked up and sowing continues. If this occupied hole is in the opponent's row and is made to contain four with the final counter, this hole and the one opposite it are captured, the counters remaining in the holes. Players may not sow from these holes. If on a subsequent turn the final counter of a sowing falls into an opponent's captured hole, one counter from the hole is captured, as well as the final counter of the sowing, and the turn ends. When the final counter of a sowing lands in an empty hole, the turn ends. Play continues until one of the players can no longer move, the opponent taking any remaining counters in free holes on their side of the board and each player taking the counters in their captured holes. A new round begins. Players attempt to fill their holes with four counters each. If a player has two extra counters, they may loan them to the other player, to be repaid when they can in a subsequent round. If a player has one extra counter, it is surrendered to the opponent. The player with more counter would only fill as many hole as the opponent is able to fill, retaining their extra counters for future rounds. Play continues until one player cannot fill any holes.
###Ludii
(game "Leyla" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "5,W,N,E" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(and (is Occupied (from)) (= 0 (state at:(from))))) (then (sow apply:(if (!= 0 (state at:(to))) (if (= (next) (state at:(to))) (and (fromTo (from (to)) (to (handSite Mover)) count:(min 2 (count at:(to)))) (set State at:(to) (next)))) (if (and (is In (to) (sites Next)) (= 4 (count at:(to)))) (and (set State at:(to) (mover)) (set State at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)) (mover))) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to)))))))))} (then (if (and (not (is Next Mover)) (or (all Sites (sites P1) if:(or (!= 0 (state at:(site))) (is Empty (site)))) (all Sites (sites P2) if:(or (!= 0 (state at:(site))) (is Empty (site)))))) (and {(forEach Site (sites P1) (if (= 0 (state at:(site))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (= 0 (state at:(site))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))))) (forEach Site (sites Board) (if (= (state at:(site)) P1) (and (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))) (set State at:(site) 0)) (if (= (state at:(site)) P2) (and (fromTo (from (site)) (to (handSite P2)) count:(count at:(site))) (set State at:(site) 0)))))}))))) (end (if (no Pieces All in:(sites Board)) {(if (> 3 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 3 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (no Pieces All in:(sites Board)) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (if (= 1 (count Cell at:(handSite Mover))) (fromTo (from (handSite Mover)) (to (handSite Next)) count:1) (if (= 2 (count Cell at:(handSite Mover))) (fromTo (from (handSite Next)) (to (handSite Mover)) count:2) (if (= 3 (count Cell at:(handSite Mover))) (fromTo (from (handSite Next)) (to (handSite Mover)) count:1)))))))) (nextPhase (and (= (count Sites in:(forEach (sites P1) if:(is Occupied (site)))) (count Sites in:(forEach (sites P2) if:(is Occupied (site))))) (or (is Empty (handSite P1)) (is Empty (handSite P2)))) "Sowing"))})) |
2x6 board. 72 counters are distributed unevenly into the holes with the only rule that corresponding holes on either side of the board must contain counters. The opponent moves first, but may flip the board around if they prefer that arrangement, sacrificing the first move. Counters are sowed in an anti-clockwise direction from a hole in the player's row. If the last counter falls into a hole making it odd, these are picked up and sowing continues. If it lands in a hole making it even, these counters are captured as are the ones in the opposite hole. If the previous hole also has an even number, these and the ones in the opposite hole are captured. If the last counter falls into an empty hole, the turn ends. If a player has no counters in their holes, the opponent must give them one counter, to be placed in the leftmost hole and played from there. Play ends when the board is cleared of counters. Each player counts the number of counters they captured. The player with more counters is given a score equal to the difference in the number of counters. Another round begins again exactly as before. The game is won when a player accumulates sixty points. | (game "Li'b al-'Aqil" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "LeftMost" {(pair P1 0) (pair P2 11)})}) (rules (start (place "Seed" (handSite P1) count:72)) phases:{(phase "Opening1" (play (or {(if (is Occupied Cell (handSite P1)) (forEach Value min:1 max:(count Cell at:(handSite P1)) (move (from (handSite P1)) (to (sites Board)) count:(value))) (forEach Site (sites Board) (if (is Occupied (site)) (move (from (site)) (to (sites Board) if:(!= (to) (from)))))) (then (moveAgain))) (if (and (is Empty (handSite P1)) (all Sites (sites Bottom) if:(if (is Empty (site)) (is Empty (+ (site) 6)) (is Occupied (+ (site) 6))))) (move Pass))})) (nextPhase (was Pass) "Opening2")) (phase "Opening2" (play (or (move Pass (then (moveAgain))) (move Swap Players P1 P2) (then (set Pending)))) (nextPhase "Sowing")) (phase "Sowing" (play (if (and (not (is Prev Mover)) (all Sites (sites Next) if:(= 0 (count at:(site))))) (move (from (sites Mover) if:(is Occupied (from))) (to (mapEntry "LeftMost" Next))) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(is Occupied (from))) (then (sow if:True apply:(if (is Odd (count at:(to))) (and (moveAgain) (set Var "Replay" (to))) (and (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))))))) backtracking:(and (is Occupied (to)) (is Even (count at:(to))))))) (then (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (and (if (< (count Cell at:(handSite P1)) (count Cell at:(handSite P2))) (addScore P2 (- (count Cell at:(handSite P2)) (count Cell at:(handSite P1)))) (addScore P1 (- (count Cell at:(handSite P1)) (count Cell at:(handSite P2))))) (if (is Occupied Cell (handSite P2)) (fromTo (from (handSite P2)) (to (handSite P1)) count:(count Cell at:(handSite P2))))))))) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "Opening1"))} (end (forEach Player if:(<= 60 (score Player)) (result Player Win))))) | ###Description
2x6 board. 72 counters are distributed unevenly into the holes with the only rule that corresponding holes on either side of the board must contain counters. The opponent moves first, but may flip the board around if they prefer that arrangement, sacrificing the first move. Counters are sowed in an anti-clockwise direction from a hole in the player's row. If the last counter falls into a hole making it odd, these are picked up and sowing continues. If it lands in a hole making it even, these counters are captured as are the ones in the opposite hole. If the previous hole also has an even number, these and the ones in the opposite hole are captured. If the last counter falls into an empty hole, the turn ends. If a player has no counters in their holes, the opponent must give them one counter, to be placed in the leftmost hole and played from there. Play ends when the board is cleared of counters. Each player counts the number of counters they captured. The player with more counters is given a score equal to the difference in the number of counters. Another round begins again exactly as before. The game is won when a player accumulates sixty points.
###Ludii
(game "Li'b al-'Aqil" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "LeftMost" {(pair P1 0) (pair P2 11)})}) (rules (start (place "Seed" (handSite P1) count:72)) phases:{(phase "Opening1" (play (or {(if (is Occupied Cell (handSite P1)) (forEach Value min:1 max:(count Cell at:(handSite P1)) (move (from (handSite P1)) (to (sites Board)) count:(value))) (forEach Site (sites Board) (if (is Occupied (site)) (move (from (site)) (to (sites Board) if:(!= (to) (from)))))) (then (moveAgain))) (if (and (is Empty (handSite P1)) (all Sites (sites Bottom) if:(if (is Empty (site)) (is Empty (+ (site) 6)) (is Occupied (+ (site) 6))))) (move Pass))})) (nextPhase (was Pass) "Opening2")) (phase "Opening2" (play (or (move Pass (then (moveAgain))) (move Swap Players P1 P2) (then (set Pending)))) (nextPhase "Sowing")) (phase "Sowing" (play (if (and (not (is Prev Mover)) (all Sites (sites Next) if:(= 0 (count at:(site))))) (move (from (sites Mover) if:(is Occupied (from))) (to (mapEntry "LeftMost" Next))) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(is Occupied (from))) (then (sow if:True apply:(if (is Odd (count at:(to))) (and (moveAgain) (set Var "Replay" (to))) (and (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))))))) backtracking:(and (is Occupied (to)) (is Even (count at:(to))))))) (then (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (and (if (< (count Cell at:(handSite P1)) (count Cell at:(handSite P2))) (addScore P2 (- (count Cell at:(handSite P2)) (count Cell at:(handSite P1)))) (addScore P1 (- (count Cell at:(handSite P1)) (count Cell at:(handSite P2))))) (if (is Occupied Cell (handSite P2)) (fromTo (from (handSite P2)) (to (handSite P1)) count:(count Cell at:(handSite P2))))))))) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "Opening1"))} (end (forEach Player if:(<= 60 (score Player)) (result Player Win))))) |
2x6 board. 72 counters are distributed unevenly into the holes by one player in both rows, placing at least four in each hole. The opponent moves first, but may flip the board around if they prefer that arrangement. Each move must begin from the rightmost hole in a player's row or the next closest hole to it from which it is possible to move. Counters are sowed in an anti-clockwise direction. If the last counter falls into a hole making it odd, these are picked up and sowing continues. If it lands in a hole making it even, these counters are captured as are the ones in the opposite hole. If the previous hole also has an even number, these and the ones in the opposite hole are captured. If the last counter falls into an empty hole, the turn ends. If a player has no counters in their holes, the opponent must give them one counter, to be placed in the leftmost hole and played from there. Play ends when the board is cleared of counters. Each player counts the number of counters they captured. The player with more counters is given a score equal to the difference in the number of counters. Another round begins as before, with the loser distributing the counters and the winner playing first.. The game is won when a player accumulates sixty points. | (game "Li'b al-Ghashim" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start (place "Seed" (handSite P1) count:72)) phases:{(phase "Opening1" (play (or {(if (is Occupied Cell (handSite P1)) (forEach Value min:1 max:(count Cell at:(handSite P1)) (move (from (handSite P1)) (to (sites Board)) count:(value))) (forEach Site (sites Board) (if (is Occupied (site)) (move (from (site)) (to (sites Board) if:(!= (to) (from)))))) (then (moveAgain))) (if (and (is Empty (handSite P1)) (all Sites (sites Board) if:(<= 4 (count at:(site))))) (move Pass))})) (nextPhase (was Pass) "Opening2")) (phase "Opening2" (play (or (move Pass (then (and (set Pending) (moveAgain)))) (move Swap Players P1 P2 (then (and (set NextPlayer (player 1)) (set Pending)))))) (nextPhase "Sowing")) (phase "Sowing" (play (if (and (not (is Prev Mover)) (all Sites (sites Next) if:(= 0 (count at:(site))))) (move (from (sites Mover) if:(is Occupied (from))) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(and (is In (to) (sites Mover)) (is Occupied (to)))))) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(is Occupied (from))) (then (sow "TrackCCW" if:True apply:(if (is Odd (count at:(to))) (and (moveAgain) (set Var "Replay" (to))) (and (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))))))) backtracking:(and (is Occupied (to)) (is Even (count at:(to))))))) (then (if (= 1 (count in:(sites Board))) (and {(if (< (count Cell at:(handSite P1)) (count Cell at:(handSite P2))) (addScore P2 (- (count Cell at:(handSite P2)) (count Cell at:(handSite P1)))) (addScore P1 (- (count Cell at:(handSite P1)) (count Cell at:(handSite P2))))) (if (is Occupied Cell (handSite P2)) (fromTo (from (handSite P2)) (to (handSite P1)) count:(count Cell at:(handSite P2)))) (forEach Site (sites Board) (if (is Occupied (site)) (fromTo (from (site)) (to Cell (handSite P1)) count:(count at:(site)))))}))))) (nextPhase (= 1 (count in:(sites Board))) "Opening1"))} (end (forEach Player if:(<= 60 (score Player)) (result Player Win))))) | ###Description
2x6 board. 72 counters are distributed unevenly into the holes by one player in both rows, placing at least four in each hole. The opponent moves first, but may flip the board around if they prefer that arrangement. Each move must begin from the rightmost hole in a player's row or the next closest hole to it from which it is possible to move. Counters are sowed in an anti-clockwise direction. If the last counter falls into a hole making it odd, these are picked up and sowing continues. If it lands in a hole making it even, these counters are captured as are the ones in the opposite hole. If the previous hole also has an even number, these and the ones in the opposite hole are captured. If the last counter falls into an empty hole, the turn ends. If a player has no counters in their holes, the opponent must give them one counter, to be placed in the leftmost hole and played from there. Play ends when the board is cleared of counters. Each player counts the number of counters they captured. The player with more counters is given a score equal to the difference in the number of counters. Another round begins as before, with the loser distributing the counters and the winner playing first.. The game is won when a player accumulates sixty points.
###Ludii
(game "Li'b al-Ghashim" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start (place "Seed" (handSite P1) count:72)) phases:{(phase "Opening1" (play (or {(if (is Occupied Cell (handSite P1)) (forEach Value min:1 max:(count Cell at:(handSite P1)) (move (from (handSite P1)) (to (sites Board)) count:(value))) (forEach Site (sites Board) (if (is Occupied (site)) (move (from (site)) (to (sites Board) if:(!= (to) (from)))))) (then (moveAgain))) (if (and (is Empty (handSite P1)) (all Sites (sites Board) if:(<= 4 (count at:(site))))) (move Pass))})) (nextPhase (was Pass) "Opening2")) (phase "Opening2" (play (or (move Pass (then (and (set Pending) (moveAgain)))) (move Swap Players P1 P2 (then (and (set NextPlayer (player 1)) (set Pending)))))) (nextPhase "Sowing")) (phase "Sowing" (play (if (and (not (is Prev Mover)) (all Sites (sites Next) if:(= 0 (count at:(site))))) (move (from (sites Mover) if:(is Occupied (from))) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(and (is In (to) (sites Mover)) (is Occupied (to)))))) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(is Occupied (from))) (then (sow "TrackCCW" if:True apply:(if (is Odd (count at:(to))) (and (moveAgain) (set Var "Replay" (to))) (and (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))))))) backtracking:(and (is Occupied (to)) (is Even (count at:(to))))))) (then (if (= 1 (count in:(sites Board))) (and {(if (< (count Cell at:(handSite P1)) (count Cell at:(handSite P2))) (addScore P2 (- (count Cell at:(handSite P2)) (count Cell at:(handSite P1)))) (addScore P1 (- (count Cell at:(handSite P1)) (count Cell at:(handSite P2))))) (if (is Occupied Cell (handSite P2)) (fromTo (from (handSite P2)) (to (handSite P1)) count:(count Cell at:(handSite P2)))) (forEach Site (sites Board) (if (is Occupied (site)) (fromTo (from (site)) (to Cell (handSite P1)) count:(count at:(site)))))}))))) (nextPhase (= 1 (count in:(sites Board))) "Opening1"))} (end (forEach Player if:(<= 60 (score Player)) (result Player Win))))) |
2x6 board, with a store hole on either end. Four counters in each hole. Each player owns the six holes, three holes in each row, to their right. Sowing occurs in an anti-clockwise direction, and only in the holes belonging to the player. Play begins with a stylized opening move. The first player takes the counters from the holes in each of the row of holes closest to them, and places them in the central row of their holes in the further row. The counters from the hole next in the direction of sowing are then sown. The counters from the central hole in the further of the player's rows are then sown. When this is completed, the player takes the counters from the holes in the row closest to them, and holds them until the opponent performs the same sequence of moves on their side of the board. At this point, each player places the counters they are holding into any hole on the opponent's side of the board which contains more than one counter. Players then alternate turns sowing pieces around their holes of the board. Sowing always skips the hole from which sowing began. When the final counter of a sowing causes a hole to contain four counters, these counters are placed on any hole on the opponent's side of the board that contains more than one counter. When a player has only single seeds in their holes, and the opponent is about to place counters in the player's holes, the opponent moves one of the player's counters into another hole containing one counter, thus making two, and places the counters from the opponent's side are placed there. The player who is able to place all of their counters on the opponent's side of the board wins. The opening rules of the variant Lontu Holo. | (game "Lontu-Holo" (players 2) (equipment {(mancalaBoard 2 6 {(track "TrackCCW1" {1 2 3 9 8 7} loop:True P1) (track "TrackCCW2" {4 5 6 12 11 10} loop:True P2)}) (regions "Home" P1 (sites Track "TrackCCW1")) (regions "Home" P2 (sites Track "TrackCCW2")) (regions "TwoHolesClosestNotCentre" P1 (sites {1 3})) (regions "TwoHolesClosestNotCentre" P2 (sites {10 12})) (regions "TwoHolesFurtherNotCentre" P1 (sites {7 9})) (regions "TwoHolesFurtherNotCentre" P2 (sites {4 6})) (regions "LeftMostHoles" P1 (intersection (expand (sites Left)) (sites Track "TrackCCW1"))) (regions "LeftMostHoles" P2 (intersection (expand (sites Right)) (sites Track "TrackCCW2"))) (regions "RightMostHoles" P1 (intersection (sites Centre) (sites Track "TrackCCW1"))) (regions "RightMostHoles" P2 (intersection (sites Centre) (sites Track "TrackCCW2"))) (regions "ClosestRow" P1 (intersection (sites Bottom) (sites Track "TrackCCW1"))) (regions "ClosestRow" P2 (intersection (sites Top) (sites Track "TrackCCW2"))) (map "CentreFurtherRow" {(pair P1 8) (pair P2 5)}) (map "CentreClosestRow" {(pair P1 2) (pair P2 11)}) (map "RightFurtherRow" {(pair P1 9) (pair P2 4)}) (map "RightClosestRow" {(pair P1 3) (pair P2 10)}) (map "LeftFurtherRow" {(pair P1 7) (pair P2 6)}) (map "LeftClosestRow" {(pair P1 1) (pair P2 12)}) (piece "Seed" Shared) (map "Store" {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start (set Count 4 to:(union (sites Bottom) (sites Top)))) phases:{(phase "Opening1" (play (move (from (sites Mover "TwoHolesClosestNotCentre") if:(is Occupied (from))) (to (mapEntry "CentreFurtherRow" Mover)) count:(count at:(from)))) (nextPhase Mover (all Sites (sites Mover "TwoHolesClosestNotCentre") if:(is Empty (site))) "Opening2")) (phase "Opening2" (play (move Select (from (trackSite Move from:(mapEntry "CentreFurtherRow" Mover) "TrackCCW" steps:1)) (then (sow "TrackCCW" owner:(mover))))) (nextPhase Mover "Opening3")) (phase "Opening3" (play (move Select (from (mapEntry "CentreFurtherRow" Mover)) (then (sow "TrackCCW" owner:(mover))))) (nextPhase Mover "Opening4")) (phase "Opening4" (play (move (from (sites Mover "ClosestRow") if:(is Occupied (from))) (to (mapEntry "Store" Mover)) count:(count at:(from)))) (nextPhase Mover (all Sites (sites Mover "ClosestRow") if:(is Empty (site))) "Opening5")) (phase "Opening5" (play (move (from (mapEntry "Store" Mover)) (to (sites Mover "Home") if:(< 1 (count at:(to)))) count:1)) (nextPhase Mover (is Empty (mapEntry "Store" Mover)) "Sowing")) (phase "Sowing" (play (if (is Prev Mover) (if (all Sites (sites Next "Home") if:(= 1 (count at:(site)))) (move (from (sites Next "Home")) (to (sites Next "Home") if:(!= (from) (to))) count:1 (then (moveAgain))) (move (from (var "Replay")) (to (sites Next "Home") if:(< 1 (count at:(to)))) count:1 (then (if (is Occupied (last From)) (moveAgain))))) (move Select (from (sites Mover "Home") if:(is Occupied (from))) (then (sow "TrackCCW" owner:(mover) apply:(if (= 4 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))))))) (end (if (all Sites (sites Mover "Home") if:(is Empty (site))) (result Mover Win))))})) | ###Description
2x6 board, with a store hole on either end. Four counters in each hole. Each player owns the six holes, three holes in each row, to their right. Sowing occurs in an anti-clockwise direction, and only in the holes belonging to the player. Play begins with a stylized opening move. The first player takes the counters from the holes in each of the row of holes closest to them, and places them in the central row of their holes in the further row. The counters from the hole next in the direction of sowing are then sown. The counters from the central hole in the further of the player's rows are then sown. When this is completed, the player takes the counters from the holes in the row closest to them, and holds them until the opponent performs the same sequence of moves on their side of the board. At this point, each player places the counters they are holding into any hole on the opponent's side of the board which contains more than one counter. Players then alternate turns sowing pieces around their holes of the board. Sowing always skips the hole from which sowing began. When the final counter of a sowing causes a hole to contain four counters, these counters are placed on any hole on the opponent's side of the board that contains more than one counter. When a player has only single seeds in their holes, and the opponent is about to place counters in the player's holes, the opponent moves one of the player's counters into another hole containing one counter, thus making two, and places the counters from the opponent's side are placed there. The player who is able to place all of their counters on the opponent's side of the board wins. The opening rules of the variant Lontu Holo.
###Ludii
(game "Lontu-Holo" (players 2) (equipment {(mancalaBoard 2 6 {(track "TrackCCW1" {1 2 3 9 8 7} loop:True P1) (track "TrackCCW2" {4 5 6 12 11 10} loop:True P2)}) (regions "Home" P1 (sites Track "TrackCCW1")) (regions "Home" P2 (sites Track "TrackCCW2")) (regions "TwoHolesClosestNotCentre" P1 (sites {1 3})) (regions "TwoHolesClosestNotCentre" P2 (sites {10 12})) (regions "TwoHolesFurtherNotCentre" P1 (sites {7 9})) (regions "TwoHolesFurtherNotCentre" P2 (sites {4 6})) (regions "LeftMostHoles" P1 (intersection (expand (sites Left)) (sites Track "TrackCCW1"))) (regions "LeftMostHoles" P2 (intersection (expand (sites Right)) (sites Track "TrackCCW2"))) (regions "RightMostHoles" P1 (intersection (sites Centre) (sites Track "TrackCCW1"))) (regions "RightMostHoles" P2 (intersection (sites Centre) (sites Track "TrackCCW2"))) (regions "ClosestRow" P1 (intersection (sites Bottom) (sites Track "TrackCCW1"))) (regions "ClosestRow" P2 (intersection (sites Top) (sites Track "TrackCCW2"))) (map "CentreFurtherRow" {(pair P1 8) (pair P2 5)}) (map "CentreClosestRow" {(pair P1 2) (pair P2 11)}) (map "RightFurtherRow" {(pair P1 9) (pair P2 4)}) (map "RightClosestRow" {(pair P1 3) (pair P2 10)}) (map "LeftFurtherRow" {(pair P1 7) (pair P2 6)}) (map "LeftClosestRow" {(pair P1 1) (pair P2 12)}) (piece "Seed" Shared) (map "Store" {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start (set Count 4 to:(union (sites Bottom) (sites Top)))) phases:{(phase "Opening1" (play (move (from (sites Mover "TwoHolesClosestNotCentre") if:(is Occupied (from))) (to (mapEntry "CentreFurtherRow" Mover)) count:(count at:(from)))) (nextPhase Mover (all Sites (sites Mover "TwoHolesClosestNotCentre") if:(is Empty (site))) "Opening2")) (phase "Opening2" (play (move Select (from (trackSite Move from:(mapEntry "CentreFurtherRow" Mover) "TrackCCW" steps:1)) (then (sow "TrackCCW" owner:(mover))))) (nextPhase Mover "Opening3")) (phase "Opening3" (play (move Select (from (mapEntry "CentreFurtherRow" Mover)) (then (sow "TrackCCW" owner:(mover))))) (nextPhase Mover "Opening4")) (phase "Opening4" (play (move (from (sites Mover "ClosestRow") if:(is Occupied (from))) (to (mapEntry "Store" Mover)) count:(count at:(from)))) (nextPhase Mover (all Sites (sites Mover "ClosestRow") if:(is Empty (site))) "Opening5")) (phase "Opening5" (play (move (from (mapEntry "Store" Mover)) (to (sites Mover "Home") if:(< 1 (count at:(to)))) count:1)) (nextPhase Mover (is Empty (mapEntry "Store" Mover)) "Sowing")) (phase "Sowing" (play (if (is Prev Mover) (if (all Sites (sites Next "Home") if:(= 1 (count at:(site)))) (move (from (sites Next "Home")) (to (sites Next "Home") if:(!= (from) (to))) count:1 (then (moveAgain))) (move (from (var "Replay")) (to (sites Next "Home") if:(< 1 (count at:(to)))) count:1 (then (if (is Occupied (last From)) (moveAgain))))) (move Select (from (sites Mover "Home") if:(is Occupied (from))) (then (sow "TrackCCW" owner:(mover) apply:(if (= 4 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))))))) (end (if (all Sites (sites Mover "Home") if:(is Empty (site))) (result Mover Win))))})) |
2x7 board. Four counters per hole. The first player takes all of the counters from one of their holes. If they take from the central hole, they can be placed in any other hole on the board. If they are from any other hole, they can be placed in any hole except the opposite hole on the opponent's side. Once both players have made this initial move, the main phase of the game begins. Players alternate turns taking counters from one of the holes on their side of the board and sowing them. Groups of four counters are always sown. Play can occur in a clockwise or anti-clockwise direction. Players sow four counters at a time; that is, placing four counters in each hole. When the final four counters land in an empty hole in the player's row, any counters in the opponent's opposite hole are captured, and the player may sow again from another hole. Play continues until all of the counters have been captured, and the player with the most counters wins. | (game "Luuth" (players 2) (equipment {(mancalaBoard 2 7 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "6,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Opening" (play (move (from (sites Mover)) (to (if (is In (from) (sites Centre)) (difference (sites Board) (from)) (difference (sites Board) (sites {(from) (if (is Mover P1) (+ (from) 7) (- (from) 7))})))) count:(count at:(from)))) (nextPhase Mover "Sowing")) (phase "Sowing" (play (or (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow numPerHole:4 "TrackCCW" apply:(if (and (is In (to) (sites Mover)) (= 4 (count at:(to)))) (and (moveAgain) (if (is Occupied (if (is Mover P1) (+ (to) 7) (- (to) 7))) (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 7) (- (to) 7)))))))))) (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow numPerHole:4 "TrackCW" apply:(if (and (is In (to) (sites Mover)) (= 4 (count at:(to)))) (and (moveAgain) (if (is Occupied (if (is Mover P1) (+ (to) 7) (- (to) 7))) (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 7) (- (to) 7)))))))))))))} (end (if (= 4 (count Pieces All in:(sites Board))) (byScore {(score P1 (+ (count in:(sites Mover)) (count Cell at:(handSite P1)))) (score P2 (+ (count in:(sites Mover)) (count Cell at:(handSite P2))))}))))) | ###Description
2x7 board. Four counters per hole. The first player takes all of the counters from one of their holes. If they take from the central hole, they can be placed in any other hole on the board. If they are from any other hole, they can be placed in any hole except the opposite hole on the opponent's side. Once both players have made this initial move, the main phase of the game begins. Players alternate turns taking counters from one of the holes on their side of the board and sowing them. Groups of four counters are always sown. Play can occur in a clockwise or anti-clockwise direction. Players sow four counters at a time; that is, placing four counters in each hole. When the final four counters land in an empty hole in the player's row, any counters in the opponent's opposite hole are captured, and the player may sow again from another hole. Play continues until all of the counters have been captured, and the player with the most counters wins.
###Ludii
(game "Luuth" (players 2) (equipment {(mancalaBoard 2 7 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "6,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start (set Count 4 to:(sites Track))) phases:{(phase "Opening" (play (move (from (sites Mover)) (to (if (is In (from) (sites Centre)) (difference (sites Board) (from)) (difference (sites Board) (sites {(from) (if (is Mover P1) (+ (from) 7) (- (from) 7))})))) count:(count at:(from)))) (nextPhase Mover "Sowing")) (phase "Sowing" (play (or (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow numPerHole:4 "TrackCCW" apply:(if (and (is In (to) (sites Mover)) (= 4 (count at:(to)))) (and (moveAgain) (if (is Occupied (if (is Mover P1) (+ (to) 7) (- (to) 7))) (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 7) (- (to) 7)))))))))) (move Select (from (sites Mover) if:(is Occupied (from))) (then (sow numPerHole:4 "TrackCW" apply:(if (and (is In (to) (sites Mover)) (= 4 (count at:(to)))) (and (moveAgain) (if (is Occupied (if (is Mover P1) (+ (to) 7) (- (to) 7))) (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 7) (- (to) 7)))))))))))))} (end (if (= 4 (count Pieces All in:(sites Board))) (byScore {(score P1 (+ (count in:(sites Mover)) (count Cell at:(handSite P1)))) (score P2 (+ (count in:(sites Mover)) (count Cell at:(handSite P2))))}))))) |
2x6-9 holes with a store on either end. Play starts with same number of counters in each hole as number of holes in the row (6 counters if 6 holes in a row, etc). Store on either end. A player's store is the store to their left. Stores are included when sowing. Play begins from any hole belonging to the player. Counters are sowed clockwise: if the final counter lands in an empty hole, in player's own row, they take the counters in the opposite hole and place them in the store. If play ends in the store, they can then take counters from any of their holes and sow again. if play ends in an empty hole in the opponent's row, play ends. If play ends in a hole with counters, those are collected and sowing continues. A round ends when there are no counters left in a player's row. The opponent then takes all remaining counters and adds them to their store. Next round begins with each player taking the counters from their store and placing the same number of counters in the holes as when the game began, starting from right to left. Surplus counters are placed in the store. Unfilled holes are excluded from play in this round. Play continues as before. Play continues with as many rounds as needed until one player does not have enough counters to fill a single hole. Each player has 6 holes. | (game "Main Chongkak" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "0,ENE,E,ESE,WSW,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (map "RightMost" {(pair P1 6) (pair P2 (+ 6 1))})}) (rules (start {(set RememberValue "Playable" (union (sites Top) (sites Bottom))) (set Count 6 to:(union (sites Bottom) (sites Top)))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow apply:(if (and (is In (to) (sites Mover)) (= 1 (count at:(to)))) (if (is Occupied (if (is Mover P1) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (mapEntry Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))) (if (= (to) (mapEntry Mover)) (and (set Pending) (moveAgain)) (if (and (< 1 (count at:(to))) (!= (to) (mapEntry Next))) (and (moveAgain) (set Var "Replay" (to)))))) skipIf:(and {(not (is In (to) (sites (values Remembered "Playable")))) (!= (to) (mapEntry P1)) (!= (to) (mapEntry P2))}))))} (then (if (or (all Sites (sites Bottom) if:(= 0 (count at:(site)))) (all Sites (sites Top) if:(= 0 (count at:(site))))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site)))) (forget Value "Playable" All)}))))) (end (if (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) {(if (> 6 (count at:(mapEntry P1))) (result P2 Win)) (if (> 6 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 6 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (trackSite FirstSite from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:6 (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x6-9 holes with a store on either end. Play starts with same number of counters in each hole as number of holes in the row (6 counters if 6 holes in a row, etc). Store on either end. A player's store is the store to their left. Stores are included when sowing. Play begins from any hole belonging to the player. Counters are sowed clockwise: if the final counter lands in an empty hole, in player's own row, they take the counters in the opposite hole and place them in the store. If play ends in the store, they can then take counters from any of their holes and sow again. if play ends in an empty hole in the opponent's row, play ends. If play ends in a hole with counters, those are collected and sowing continues. A round ends when there are no counters left in a player's row. The opponent then takes all remaining counters and adds them to their store. Next round begins with each player taking the counters from their store and placing the same number of counters in the holes as when the game began, starting from right to left. Surplus counters are placed in the store. Unfilled holes are excluded from play in this round. Play continues as before. Play continues with as many rounds as needed until one player does not have enough counters to fill a single hole. Each player has 6 holes.
###Ludii
(game "Main Chongkak" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "0,ENE,E,ESE,WSW,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (map "RightMost" {(pair P1 6) (pair P2 (+ 6 1))})}) (rules (start {(set RememberValue "Playable" (union (sites Top) (sites Bottom))) (set Count 6 to:(union (sites Bottom) (sites Top)))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow apply:(if (and (is In (to) (sites Mover)) (= 1 (count at:(to)))) (if (is Occupied (if (is Mover P1) (+ (to) 6) (- (to) 6))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (mapEntry Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))) (if (= (to) (mapEntry Mover)) (and (set Pending) (moveAgain)) (if (and (< 1 (count at:(to))) (!= (to) (mapEntry Next))) (and (moveAgain) (set Var "Replay" (to)))))) skipIf:(and {(not (is In (to) (sites (values Remembered "Playable")))) (!= (to) (mapEntry P1)) (!= (to) (mapEntry P2))}))))} (then (if (or (all Sites (sites Bottom) if:(= 0 (count at:(site)))) (all Sites (sites Top) if:(= 0 (count at:(site))))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site)))) (forget Value "Playable" All)}))))) (end (if (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) {(if (> 6 (count at:(mapEntry P1))) (result P2 Win)) (if (> 6 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (all Sites (union (sites Top) (sites Bottom)) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 6 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (trackSite FirstSite from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:6 (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "Sowing"))})) |
2x6 board. Seventy counters. One player distributes the counters unevenly in the central four holes (central two holes of each row). The opponent then has the option to flip the board around if they are not satisfied with the distribution. Opponent begins play. The first move must be from the fourth hole in the row. Sowing occurs in a clockwise direction. Capturing cannot happen on the first move. If the last counter is dropped into a hole, creating an odd number of counters in it, play ends. If the number is now even and the hole in the other player's row also has an even number, the contents of both holes are captured. If the final hole is now even but the other player's row does not have an even number of counters, the counters are picked up and a new sowing begins. If the final hole has more than ten counters it cannot be captured and sowing must continue from this hole whether the number is even or odd. Play ends when a player has no more counters on their side of the board. The player who has captured the greatest number of counters wins. | (game "Mangala (Bedouin)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "5,W,N,E" loop:True)) (piece "Seed" Shared) (hand Each) (hand Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "FourthHole" {(pair P1 3) (pair P2 8)})}) (rules (start (place "Seed" (handSite Shared) count:17)) phases:{(phase "OpeningP1" (play (move (from (handSite Shared)) (to (sites Centre)) (then (if (is Occupied (handSite Shared)) (moveAgain))))) (nextPhase (is Empty (handSite Shared)) "OpeningP2")) (phase "OpeningP2" (play (or (move Pass) (if (is Mover P2) (move Pass (then (and {(remove (sites Centre)) (add (piece (id "Seed" Shared)) (to 9) count:(count at:2)) (add (piece (id "Seed" Shared)) (to 2) count:(count at:9)) (add (piece (id "Seed" Shared)) (to 8) count:(count at:3)) (add (piece (id "Seed" Shared)) (to 3) count:(count at:8))})))))) (nextPhase (all Passed) "SowingRestricted")) (phase "SowingRestricted" (play (move Select (from (mapEntry Mover) if:(is Occupied (from))) (then (sow)))) (nextPhase Mover "Sowing")) (phase "Sowing" (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (< 10 (count at:(to))) (moveAgain) (if (is Even (count at:(to))) (if (is Even (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6)))) (and (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))) (moveAgain)))))))) (end (if (or (all Sites (sites P1) if:(= 0 (count at:(site)))) (all Sites (sites P2) if:(= 0 (count at:(site))))) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))})) | ###Description
2x6 board. Seventy counters. One player distributes the counters unevenly in the central four holes (central two holes of each row). The opponent then has the option to flip the board around if they are not satisfied with the distribution. Opponent begins play. The first move must be from the fourth hole in the row. Sowing occurs in a clockwise direction. Capturing cannot happen on the first move. If the last counter is dropped into a hole, creating an odd number of counters in it, play ends. If the number is now even and the hole in the other player's row also has an even number, the contents of both holes are captured. If the final hole is now even but the other player's row does not have an even number of counters, the counters are picked up and a new sowing begins. If the final hole has more than ten counters it cannot be captured and sowing must continue from this hole whether the number is even or odd. Play ends when a player has no more counters on their side of the board. The player who has captured the greatest number of counters wins.
###Ludii
(game "Mangala (Bedouin)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "5,W,N,E" loop:True)) (piece "Seed" Shared) (hand Each) (hand Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "FourthHole" {(pair P1 3) (pair P2 8)})}) (rules (start (place "Seed" (handSite Shared) count:17)) phases:{(phase "OpeningP1" (play (move (from (handSite Shared)) (to (sites Centre)) (then (if (is Occupied (handSite Shared)) (moveAgain))))) (nextPhase (is Empty (handSite Shared)) "OpeningP2")) (phase "OpeningP2" (play (or (move Pass) (if (is Mover P2) (move Pass (then (and {(remove (sites Centre)) (add (piece (id "Seed" Shared)) (to 9) count:(count at:2)) (add (piece (id "Seed" Shared)) (to 2) count:(count at:9)) (add (piece (id "Seed" Shared)) (to 8) count:(count at:3)) (add (piece (id "Seed" Shared)) (to 3) count:(count at:8))})))))) (nextPhase (all Passed) "SowingRestricted")) (phase "SowingRestricted" (play (move Select (from (mapEntry Mover) if:(is Occupied (from))) (then (sow)))) (nextPhase Mover "Sowing")) (phase "Sowing" (play (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (< 10 (count at:(to))) (moveAgain) (if (is Even (count at:(to))) (if (is Even (count at:(if (is Mover P1) (+ (to) 6) (- (to) 6)))) (and (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) (fromTo (from (if (is Mover P1) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is Mover P1) (+ (to) 6) (- (to) 6))))) (moveAgain)))))))) (end (if (or (all Sites (sites P1) if:(= 0 (count at:(site)))) (all Sites (sites P2) if:(= 0 (count at:(site))))) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))})) |
2x6 board. Eight counters in each hole; two holes in one player's row and one in the opponent's row are left empty. Sowing in an anti-clockwise direction. No captures in first two turns. If the last counter falls into a hole that is occupied, these are picked up and the sowing continues. When the last counter of a sowing falls into an empty hole, the counters in the opposite hole are captured. The player continues play by moving the counter that made the capture into the next hole, and continuing play. If the last counter falls into an empty hole and the opposite hole is also empty, the turn ends. The player who captures the most counters wins. | (game "Mangala (Suez)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 8 to:(sites Track))) phases:{(phase "Opening" (play (move Remove (sites Mover) count:(count at:(to)))) (nextPhase (<= 3 (count Turns)) "Sowing")) (phase "Sowing" (play (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(is Occupied (from))) (then (sow apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))) (if (<= 7 (count Turns)) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (and {(fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))) (moveAgain) (set Var "Replay" (to))})))))))) (end (if (no Moves Next) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))})) | ###Description
2x6 board. Eight counters in each hole; two holes in one player's row and one in the opponent's row are left empty. Sowing in an anti-clockwise direction. No captures in first two turns. If the last counter falls into a hole that is occupied, these are picked up and the sowing continues. When the last counter of a sowing falls into an empty hole, the counters in the opposite hole are captured. The player continues play by moving the counter that made the capture into the next hole, and continuing play. If the last counter falls into an empty hole and the opposite hole is also empty, the turn ends. The player who captures the most counters wins.
###Ludii
(game "Mangala (Suez)" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 8 to:(sites Track))) phases:{(phase "Opening" (play (move Remove (sites Mover) count:(count at:(to)))) (nextPhase (<= 3 (count Turns)) "Sowing")) (phase "Sowing" (play (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(is Occupied (from))) (then (sow apply:(if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))) (if (<= 7 (count Turns)) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (and {(fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 6) (- (to) 6)))) (moveAgain) (set Var "Replay" (to))})))))))) (end (if (no Moves Next) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))})) |
2x7 board. The game starts with five counters in each hole. Play begins from a player's hole, sowing in a counter clockwise direction. If the last counter is sown in a hole containing one or three counters, they are taken. if the previous hole also has one or three, these are also taken. Play continues until all the holes are empty. The taken stones are then placed five in each hole, and the player with more counters than that needed to fill the holes in their row wins. Each player has 7 holes. | (game "Mangala (Turkey)" (players 2) (equipment {(mancalaBoard 2 7 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 5 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow if:(or (= (count at:(to)) 1) (= (count at:(to)) 3)) apply:(fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) backtracking:True)))) (end (if (= (count in:(sites Track)) 0) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) | ###Description
2x7 board. The game starts with five counters in each hole. Play begins from a player's hole, sowing in a counter clockwise direction. If the last counter is sown in a hole containing one or three counters, they are taken. if the previous hole also has one or three, these are also taken. Play continues until all the holes are empty. The taken stones are then placed five in each hole, and the player with more counters than that needed to fill the holes in their row wins. Each player has 7 holes.
###Ludii
(game "Mangala (Turkey)" (players 2) (equipment {(mancalaBoard 2 7 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 5 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow if:(or (= (count at:(to)) 1) (= (count at:(to)) 3)) apply:(fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) backtracking:True)))) (end (if (= (count in:(sites Track)) 0) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) |
2x6 board. Six counters in each hole. Players take the contents of one of their holes and sow in an anti-clockwise direction. When the final counter of a sowing lands in a hole, making it contain two, four, or six counters, these counters are taken. If the second to last hole also contains two, four, or six counters, these are also taken, continuing in an unbroken line until a hole with containing a number of counters other than two, four, or six. The game continues until all of the counters have been captured. The player who captured the most counters wins. | (game "Mankala" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 6 to:(sites Track))) (play (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow if:(or {(= (count at:(to)) 2) (= (count at:(to)) 4) (= (count at:(to)) 6)}) apply:(fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) backtracking:True)))) (end (if (and (no Moves Next) (no Moves Mover)) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) | ###Description
2x6 board. Six counters in each hole. Players take the contents of one of their holes and sow in an anti-clockwise direction. When the final counter of a sowing lands in a hole, making it contain two, four, or six counters, these counters are taken. If the second to last hole also contains two, four, or six counters, these are also taken, continuing in an unbroken line until a hole with containing a number of counters other than two, four, or six. The game continues until all of the counters have been captured. The player who captured the most counters wins.
###Ludii
(game "Mankala" (players 2) (equipment {(mancalaBoard 2 6 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 6 to:(sites Track))) (play (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow if:(or {(= (count at:(to)) 2) (= (count at:(to)) 4) (= (count at:(to)) 6)}) apply:(fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) backtracking:True)))) (end (if (and (no Moves Next) (no Moves Mover)) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) |
2x7 board. Five counters in each hole. Players sow in a clockwise direction. When the final counter lands in a hole, the contents of the next hole are picked up and sowing continues. When the final counter is sown and the next hole is empty, the contents of the hole in the opposite row of the empty hole are captured. Play continues until all of the counters are captured. A new game begins. The players fill their holes with five counters in each, starting from their left. The player who has remaining counters after all of their holes are full puts the extra counters aside. The player who has fewer counters places the remainder in the next empty hole. Any empty holes are out of play for the round. Play begins with the same rules, with the following modifications: Each player, during their opponent's turn, also captures counters in any hole that are made to equal the number of extra counters they had at the beginning of this round (i.e., the number of counters set aside by the winning player or the number of counters less than five that placed in the final hole by the loser). The player who could fill their holes will capture one counter each time that player sows into the hole in which the opponent placed fewer than five counters at the beginning of the round. The opponent cannot sow in this hole. In addition, at the end of the round, the player who filled their holes at the beginning of the round will always capture pieces that accumulate in this hole. Subsequent rounds are played like this until one player captures all of the counters, and thus wins. | (game "Mawkar Katiya" (players 2) (equipment {(mancalaBoard 2 7 store:None {(track "TrackCW" "6,W,N,E" loop:True) (track "TrackCCW" "0,E,N,W" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "LeftMost" {(pair P1 0) (pair P2 13)})}) (rules (start {(set Count 5 to:(sites Track "TrackCW")) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (!= (next) (state at:(from)))})) (then (do (and (set Var "NumSowed" (count at:(last To))) (set Var "StateSowFrom" (state at:(last To)))) next:(sow "TrackCW" apply:(if (is Occupied (trackSite Move from:(to) "Track" steps:1)) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "Track" steps:1))) (if (is Occupied (if (is In (trackSite Move from:(to) "Track" steps:1) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:1) 7) (- (trackSite Move from:(to) "Track" steps:1) 7))) (and (fromTo (from (if (is In (trackSite Move from:(to) "Track" steps:1) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:1) 7) (- (trackSite Move from:(to) "Track" steps:1) 7))) (to (handSite Mover)) count:(count at:(if (is In (trackSite Move from:(to) "Track" steps:1) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:1) 7) (- (trackSite Move from:(to) "Track" steps:1) 7)))) (set State at:(if (is In (trackSite Move from:(to) "Track" steps:1) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:1) 7) (- (trackSite Move from:(to) "Track" steps:1) 7)) (state at:(if (is In (trackSite Move from:(to) "Track" steps:1) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:1) 7) (- (trackSite Move from:(to) "Track" steps:1) 7))))))) skipIf:(or (and (!= (state at:(to)) (mover)) (!= (state at:(to)) 0)) (not (is In (to) (sites (values Remembered "Playable")))))) (then (and {(forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(var "NumSowed"))) (if (and (= (value Player Mover) (count at:(site))) (or (= (state at:(site)) (mover)) (= (state at:(site)) 0))) (and (fromTo (from (site)) (to (handSite Mover)) count:(value Player Mover)) (set State at:(site) (state at:(site)))) (if (and (is Occupied (site)) (= (mover) (state at:(site)))) (and (fromTo (from (site)) (to (handSite Mover)) count:1) (set State at:(site) (state at:(site))))))) (set Var "NumSowed" 0) (if (< 0 (var "StateSowFrom")) (set State at:(last From) (var "StateSowFrom")))})))))} (then (if (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) (and {(forEach Site (sites Board) (and (if (= (state at:(site)) 1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (if (= (state at:(site)) 2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))))) (forget Value "Playable" All) (if (>= (count Cell at:(handSite P1)) (count Cell at:(handSite P2))) (set Var "CurrentWinner" 1) (set Var "CurrentWinner" 2)) (set Value P2 0) (set Value P1 0) (forEach Site (sites Board) (if (!= 0 (state at:(site))) (set State at:(site) 0)))}))))) (end (if (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 5 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCCW" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:5 (then (remember Value "Playable" (last To)))) (if (and (!= 0 (count Cell at:(handSite Mover))) (!= (mover) (var "CurrentWinner"))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCCW" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:(count Cell at:(handSite Mover)) (then (and {(remember Value "Playable" (last To)) (set Value Mover (count at:(last To))) (set State at:(last To) (next))}))))) (if (= (mover) (var "CurrentWinner")) (move Pass (then (set Value Mover (count Cell at:(handSite Mover)))))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x7 board. Five counters in each hole. Players sow in a clockwise direction. When the final counter lands in a hole, the contents of the next hole are picked up and sowing continues. When the final counter is sown and the next hole is empty, the contents of the hole in the opposite row of the empty hole are captured. Play continues until all of the counters are captured. A new game begins. The players fill their holes with five counters in each, starting from their left. The player who has remaining counters after all of their holes are full puts the extra counters aside. The player who has fewer counters places the remainder in the next empty hole. Any empty holes are out of play for the round. Play begins with the same rules, with the following modifications: Each player, during their opponent's turn, also captures counters in any hole that are made to equal the number of extra counters they had at the beginning of this round (i.e., the number of counters set aside by the winning player or the number of counters less than five that placed in the final hole by the loser). The player who could fill their holes will capture one counter each time that player sows into the hole in which the opponent placed fewer than five counters at the beginning of the round. The opponent cannot sow in this hole. In addition, at the end of the round, the player who filled their holes at the beginning of the round will always capture pieces that accumulate in this hole. Subsequent rounds are played like this until one player captures all of the counters, and thus wins.
###Ludii
(game "Mawkar Katiya" (players 2) (equipment {(mancalaBoard 2 7 store:None {(track "TrackCW" "6,W,N,E" loop:True) (track "TrackCCW" "0,E,N,W" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "LeftMost" {(pair P1 0) (pair P2 13)})}) (rules (start {(set Count 5 to:(sites Track "TrackCW")) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (!= (next) (state at:(from)))})) (then (do (and (set Var "NumSowed" (count at:(last To))) (set Var "StateSowFrom" (state at:(last To)))) next:(sow "TrackCW" apply:(if (is Occupied (trackSite Move from:(to) "Track" steps:1)) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "Track" steps:1))) (if (is Occupied (if (is In (trackSite Move from:(to) "Track" steps:1) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:1) 7) (- (trackSite Move from:(to) "Track" steps:1) 7))) (and (fromTo (from (if (is In (trackSite Move from:(to) "Track" steps:1) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:1) 7) (- (trackSite Move from:(to) "Track" steps:1) 7))) (to (handSite Mover)) count:(count at:(if (is In (trackSite Move from:(to) "Track" steps:1) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:1) 7) (- (trackSite Move from:(to) "Track" steps:1) 7)))) (set State at:(if (is In (trackSite Move from:(to) "Track" steps:1) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:1) 7) (- (trackSite Move from:(to) "Track" steps:1) 7)) (state at:(if (is In (trackSite Move from:(to) "Track" steps:1) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:1) 7) (- (trackSite Move from:(to) "Track" steps:1) 7))))))) skipIf:(or (and (!= (state at:(to)) (mover)) (!= (state at:(to)) 0)) (not (is In (to) (sites (values Remembered "Playable")))))) (then (and {(forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(var "NumSowed"))) (if (and (= (value Player Mover) (count at:(site))) (or (= (state at:(site)) (mover)) (= (state at:(site)) 0))) (and (fromTo (from (site)) (to (handSite Mover)) count:(value Player Mover)) (set State at:(site) (state at:(site)))) (if (and (is Occupied (site)) (= (mover) (state at:(site)))) (and (fromTo (from (site)) (to (handSite Mover)) count:1) (set State at:(site) (state at:(site))))))) (set Var "NumSowed" 0) (if (< 0 (var "StateSowFrom")) (set State at:(last From) (var "StateSowFrom")))})))))} (then (if (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) (and {(forEach Site (sites Board) (and (if (= (state at:(site)) 1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (if (= (state at:(site)) 2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))))) (forget Value "Playable" All) (if (>= (count Cell at:(handSite P1)) (count Cell at:(handSite P2))) (set Var "CurrentWinner" 1) (set Var "CurrentWinner" 2)) (set Value P2 0) (set Value P1 0) (forEach Site (sites Board) (if (!= 0 (state at:(site))) (set State at:(site) 0)))}))))) (end (if (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 5 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCCW" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:5 (then (remember Value "Playable" (last To)))) (if (and (!= 0 (count Cell at:(handSite Mover))) (!= (mover) (var "CurrentWinner"))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCCW" from:(mapEntry "LeftMost" Mover) if:(is Empty (to)))) count:(count Cell at:(handSite Mover)) (then (and {(remember Value "Playable" (last To)) (set Value Mover (count at:(last To))) (set State at:(last To) (next))}))))) (if (= (mover) (var "CurrentWinner")) (move Pass (then (set Value Mover (count Cell at:(handSite Mover)))))))) (nextPhase (all Passed) "Sowing"))})) |
2x6 board with two stores. Play begins with four counters in each hole. A move begins from any of a player's holes, sowing happens anti-clockwise. Move ends if the last counter falls into an empty hole. If it lands in a hole with counters, these are picked up and sowing continues, unless the sowing makes the last hole contain four counters, in which case these are captured and the sowing continues from the next hole. When both players have too few counters to play, each one makes one move with one of their counters and then adds all of the counters on their side of the board to the store. The player with the most counters in the store wins. | (game "Meusueb" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (if (is Pending) (sites {(trackSite Move from:(last From afterConsequence:True) steps:1)}) (sites {(last To afterConsequence:True)})) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (= (count at:(to)) 4) (and (fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) (if (> (count at:(trackSite Move from:(to) steps:1)) 0) (and (moveAgain) (set Pending)))) (if (> (count at:(to)) 1) (moveAgain))))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
2x6 board with two stores. Play begins with four counters in each hole. A move begins from any of a player's holes, sowing happens anti-clockwise. Move ends if the last counter falls into an empty hole. If it lands in a hole with counters, these are picked up and sowing continues, unless the sowing makes the last hole contain four counters, in which case these are captured and the sowing continues from the next hole. When both players have too few counters to play, each one makes one move with one of their counters and then adds all of the counters on their side of the board to the store. The player with the most counters in the store wins.
###Ludii
(game "Meusueb" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (if (is Pending) (sites {(trackSite Move from:(last From afterConsequence:True) steps:1)}) (sites {(last To afterConsequence:True)})) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow apply:(if (= (count at:(to)) 4) (and (fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) (if (> (count at:(trackSite Move from:(to) steps:1)) 0) (and (moveAgain) (set Pending)))) (if (> (count at:(to)) 1) (moveAgain))))))) (end (if (no Moves Mover) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
2x6 board. Play begins with four counters in each hole. Players begin the game simultaneously, sowing according to the rules below, until one player drops their final counter into an empty hole. A player picks up the contents of any of their holes and sowing them in an anti-clockwise direction, picking up the contents of the last hole in which his counters fall, and continuing sowing. This continues until the last counter falls in an empty hole. Then it is the other player's turn. A hole is captured when the last ball is dropped into an opponent's hole containing three counters, making it four. A player cannot then take from one of these holes that they have captured. Therefore, the player cannot begin a turn from their own captured hole nor can they continue sowing from it. If the last counter of a sowing falls into an opponent's captured hole, nothing happens on the first instance, but every time after that, one of those counters are removed from the board and placed in the store, and the sowing continues with the contents of any of the player's holes. Ownership of a hole continues even if it becomes empty. When a player cannot move (i.e., there are no counters in their holes except any that are in captured holes), the opponent continues to move until the player is able to move. Play continues until all counters are either placed in the store or in captured holes and thus cannot be moved. Players then count their pieces by placing four in each hole, and the player who has more than their original number takes ownership of one of the opponent's holes for every four counters more than the original number that have been taken. If no player took four more than the original, the player with three extra gets the hole, if each player has two extra the weaker player is given the two extra counters. Play then begins again as before. The game ends when one player owns all of the counters, and thus all of the holes. | (game "Mewegae" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 4 to:(sites Track))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(and (< 0 (count at:(from))) (= 0 (state at:(from))))) (then (sow "TrackCCW" apply:(if (and (= 0 (state at:(to))) (= 4 (count at:(to)))) (set State at:(to) (mover)) (if (< 1 (count at:(to))) (if (= 0 (state at:(to))) (and (moveAgain) (set Var "Replay" (to))) (if (!= (mover) (state at:(to))) (if (is In (to) (if (is Mover P1) (sites (values Remembered "CanCaptureP1")) (sites (values Remembered "CanCaptureP2")))) (and (fromTo (from (to)) (to (handSite Mover)) count:1) (set State at:(to) (state at:(to)))) (if (is Mover P1) (remember Value "CanCaptureP1" (to)) (remember Value "CanCaptureP2" (to)))))))))))} (then (if (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) (and {(forEach Site (forEach (sites Board) if:(= 1 (state at:(site)))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (forEach (sites Board) if:(= 2 (state at:(site)))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (forget Value "CanCaptureP1" All) (forget Value "CanCaptureP2" All) (set Var "Round" (+ 1 (var "Round")))}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (>= 1 (count Cell at:(handSite P1))) (result P2 Win)) (if (>= 1 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:4 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 4 (count Cell at:(handSite Mover))) (moveAgain) (if (= 3 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:3) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}) (if (= 2 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (if (< 50 (value Random (range 1 100))) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}))))}))) (then (if (and (is Empty (handSite P1)) (is Empty (handSite P2))) (and (if (is Even (var "Round")) (set NextPlayer (player 2)) (set NextPlayer (player 1))) (set Pending)))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) | ###Description
2x6 board. Play begins with four counters in each hole. Players begin the game simultaneously, sowing according to the rules below, until one player drops their final counter into an empty hole. A player picks up the contents of any of their holes and sowing them in an anti-clockwise direction, picking up the contents of the last hole in which his counters fall, and continuing sowing. This continues until the last counter falls in an empty hole. Then it is the other player's turn. A hole is captured when the last ball is dropped into an opponent's hole containing three counters, making it four. A player cannot then take from one of these holes that they have captured. Therefore, the player cannot begin a turn from their own captured hole nor can they continue sowing from it. If the last counter of a sowing falls into an opponent's captured hole, nothing happens on the first instance, but every time after that, one of those counters are removed from the board and placed in the store, and the sowing continues with the contents of any of the player's holes. Ownership of a hole continues even if it becomes empty. When a player cannot move (i.e., there are no counters in their holes except any that are in captured holes), the opponent continues to move until the player is able to move. Play continues until all counters are either placed in the store or in captured holes and thus cannot be moved. Players then count their pieces by placing four in each hole, and the player who has more than their original number takes ownership of one of the opponent's holes for every four counters more than the original number that have been taken. If no player took four more than the original, the player with three extra gets the hole, if each player has two extra the weaker player is given the two extra counters. Play then begins again as before. The game ends when one player owns all of the counters, and thus all of the holes.
###Ludii
(game "Mewegae" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start {(set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top)) (set Count 4 to:(sites Track))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(and (< 0 (count at:(from))) (= 0 (state at:(from))))) (then (sow "TrackCCW" apply:(if (and (= 0 (state at:(to))) (= 4 (count at:(to)))) (set State at:(to) (mover)) (if (< 1 (count at:(to))) (if (= 0 (state at:(to))) (and (moveAgain) (set Var "Replay" (to))) (if (!= (mover) (state at:(to))) (if (is In (to) (if (is Mover P1) (sites (values Remembered "CanCaptureP1")) (sites (values Remembered "CanCaptureP2")))) (and (fromTo (from (to)) (to (handSite Mover)) count:1) (set State at:(to) (state at:(to)))) (if (is Mover P1) (remember Value "CanCaptureP1" (to)) (remember Value "CanCaptureP2" (to)))))))))))} (then (if (all Sites (forEach (sites Board) if:(= 0 (state at:(site)))) if:(= 0 (count at:(site)))) (and {(forEach Site (forEach (sites Board) if:(= 1 (state at:(site)))) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (forEach (sites Board) if:(= 2 (state at:(site)))) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All) (forget Value "CanCaptureP1" All) (forget Value "CanCaptureP2" All) (set Var "Round" (+ 1 (var "Round")))}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (>= 1 (count Cell at:(handSite P1))) (result P2 Win)) (if (>= 1 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:4 (then (and {(if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))) (if (<= 4 (count Cell at:(handSite Mover))) (moveAgain) (if (= 3 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:3) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:1) (if (is Mover P1) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}) (if (= 2 (count Cell at:(handSite Mover))) (and {(fromTo (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (fromTo (from (handSite Next)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:2) (if (< 50 (value Random (range 1 100))) (remember Value "OwnedP1" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) (remember Value "OwnedP2" (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))))}))))}))) (then (if (and (is Empty (handSite P1)) (is Empty (handSite P2))) (and (if (is Even (var "Round")) (set NextPlayer (player 2)) (set NextPlayer (player 1))) (set Pending)))))) (nextPhase (and (is Empty (handSite P1)) (is Empty (handSite P2))) "Sowing"))})) |
2x6 board. Four counters per hole. Play begins with a simultaneous racing move, where players attempt to be the first to drop the final counter of their sowing into an empty hole. Sowing occurs in an anti-clockwise direction. If the final counter falls into an occupied hole, these are picked up and sowing continues. If the final counter falls into an empty hole, the turn ends. At any time during the sowing, if a hole is made to contain four counters, the owner of the hole in which the four counters are located captures them, unless it is the final hole of the sowing, in which case the player who is sowing captures them. Play continues until a player can no longer move because there are no counters in their row, and the opponent captures the remaining counters. Players then count their pieces by placing four in each hole, and the player who has more than their original number takes ownership of one of the opponent's holes for every four counters more than the original number that have been taken. If no player took four more than the original, the player with three extra gets the hole. Play then begins again as before. The game ends when one player owns all of the counters, and thus all of the holes. | (game "Mewelad" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow "TrackCCW" apply:(if (= 4 (count at:(to))) (fromTo (from (to)) (to (handSite Mover)) count:4) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to)))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(- (var "NumSowed") 1))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (if (is In (to) (sites (values Remembered "OwnedP1"))) (handSite P1) (handSite P2))) count:4))) (set Var "NumSowed" 0))))))} (then (if (and (not (is Next Mover)) (or (all Sites (sites (values Remembered "OwnedP1")) if:(is Empty (site))) (all Sites (sites (values Remembered "OwnedP2")) if:(is Empty (site))))) (and {(if (no Moves P1) (forEach Site (sites Board) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites Board) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 3 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 3 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 3 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:(if (>= (count Cell at:(handSite Mover)) 4) 4 3) (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x6 board. Four counters per hole. Play begins with a simultaneous racing move, where players attempt to be the first to drop the final counter of their sowing into an empty hole. Sowing occurs in an anti-clockwise direction. If the final counter falls into an occupied hole, these are picked up and sowing continues. If the final counter falls into an empty hole, the turn ends. At any time during the sowing, if a hole is made to contain four counters, the owner of the hole in which the four counters are located captures them, unless it is the final hole of the sowing, in which case the player who is sowing captures them. Play continues until a player can no longer move because there are no counters in their row, and the opponent captures the remaining counters. Players then count their pieces by placing four in each hole, and the player who has more than their original number takes ownership of one of the opponent's holes for every four counters more than the original number that have been taken. If no player took four more than the original, the player with three extra gets the hole. Play then begins again as before. The game ends when one player owns all of the counters, and thus all of the holes.
###Ludii
(game "Mewelad" (players 2) (equipment {(mancalaBoard 2 6 store:None {(track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (hand Each) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "RightMost" {(pair P1 5) (pair P2 6)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow "TrackCCW" apply:(if (= 4 (count at:(to))) (fromTo (from (to)) (to (handSite Mover)) count:4) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to)))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(- (var "NumSowed") 1))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (if (is In (to) (sites (values Remembered "OwnedP1"))) (handSite P1) (handSite P2))) count:4))) (set Var "NumSowed" 0))))))} (then (if (and (not (is Next Mover)) (or (all Sites (sites (values Remembered "OwnedP1")) if:(is Empty (site))) (all Sites (sites (values Remembered "OwnedP2")) if:(is Empty (site))))) (and {(if (no Moves P1) (forEach Site (sites Board) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site))))) (forEach Site (sites Board) (if (is Occupied (site)) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 3 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 3 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 3 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite "TrackCW" from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:(if (>= (count Cell at:(handSite Mover)) 4) 4 3) (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))))))) (nextPhase (all Passed) "Sowing"))})) |
2x7 board. Four counters in each hole. Sowing occurs in an anti-clockwise direction and begins from one of the holes in the player's row. When the final counter lands in an occupied hole, these are picked up and sowing continues. If the occupied hole has three counters (four including the final counter from the sowing), these are captured. Then, the player picks up the counters in the next hole after the one from which the capture was made and continues sowing from there. When the final counter lands into an empty hole the turn ends. The game ends when one player no longer has any counters on their side of the board. The opponent then captures the remaining counters on the board. A new game begins, with each player filling holes with the counters they captured, four to each hole. The player now controls as many holes as they can fill with counters. Play begins with the player who played second in the previous game. Subsequent games are played until one player captures all of the holes, becoming the winner. | (game "Motiq" (players 2) (equipment {(mancalaBoard 2 7 store:None (track "Track" "0,E,N,W" loop:True)) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (sow apply:(if (= 4 (count at:(to))) (and (fromTo (from (to)) (to (handSite Mover)) count:4) (if (is Occupied (trackSite Move from:(to) steps:1)) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) steps:1))))) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))))))} (then (if (or (all Sites (sites P1) if:(= 0 (count at:(site)))) (all Sites (sites P2) if:(= 0 (count at:(site))))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 4 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 4 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (if (all Sites (sites Mover) if:(is Occupied (site))) (sites Board) (sites Mover)) if:(is Empty (to))) count:4 (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x7 board. Four counters in each hole. Sowing occurs in an anti-clockwise direction and begins from one of the holes in the player's row. When the final counter lands in an occupied hole, these are picked up and sowing continues. If the occupied hole has three counters (four including the final counter from the sowing), these are captured. Then, the player picks up the counters in the next hole after the one from which the capture was made and continues sowing from there. When the final counter lands into an empty hole the turn ends. The game ends when one player no longer has any counters on their side of the board. The opponent then captures the remaining counters on the board. A new game begins, with each player filling holes with the counters they captured, four to each hole. The player now controls as many holes as they can fill with counters. Play begins with the player who played second in the previous game. Subsequent games are played until one player captures all of the holes, becoming the winner.
###Ludii
(game "Motiq" (players 2) (equipment {(mancalaBoard 2 7 store:None (track "Track" "0,E,N,W" loop:True)) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "OwnedP1" (sites Bottom)) (set RememberValue "OwnedP2" (sites Top))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (if (is Mover P1) (sites (values Remembered "OwnedP1")) (sites (values Remembered "OwnedP2")))) if:(is Occupied (from))) (then (sow apply:(if (= 4 (count at:(to))) (and (fromTo (from (to)) (to (handSite Mover)) count:4) (if (is Occupied (trackSite Move from:(to) steps:1)) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) steps:1))))) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))))))} (then (if (or (all Sites (sites P1) if:(= 0 (count at:(site)))) (all Sites (sites P2) if:(= 0 (count at:(site))))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forget Value "OwnedP1" All) (forget Value "OwnedP2" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 4 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 4 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 4 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (if (all Sites (sites Mover) if:(is Occupied (site))) (sites Board) (sites Mover)) if:(is Empty (to))) count:4 (then (if (is Mover P1) (remember Value "OwnedP1" (last To)) (remember Value "OwnedP2" (last To))))))) (nextPhase (all Passed) "Sowing"))})) |
2x8 board. Four counters per hole. Players alternate turns taking the counters from one of the holes in their row and sowing them in an anticlockwise direction. When the final counter falls into a hole containing one or three counters, causing it to contain two or four, these counters are captured. Play continues until all of the counters have been captured. The player who captured the most counters wins. | (game "Ntyenge" (players 2) (equipment {(mancalaBoard 2 8 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow apply:(if (or (= 2 (count at:(to))) (= 4 (count at:(to)))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) | ###Description
2x8 board. Four counters per hole. Players alternate turns taking the counters from one of the holes in their row and sowing them in an anticlockwise direction. When the final counter falls into a hole containing one or three counters, causing it to contain two or four, these counters are captured. Play continues until all of the counters have been captured. The player who captured the most counters wins.
###Ludii
(game "Ntyenge" (players 2) (equipment {(mancalaBoard 2 8 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (hand Each)}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (sites Mover) if:(> (count at:(from)) 0)) (then (sow apply:(if (or (= 2 (count at:(to))) (= 4 (count at:(to)))) (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to)))))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) |
2x6 board with two stores. Four counters in each hole. Play may begin from any of the player's holes. Counters are sown anti-clockwise. If the last counter falls into an empty hole or a hole in either row, making that hole contain four counters, play ends, and the four counters are taken. Also, if at any time during the sowing a hole contains four counters, the player on whose row this occurs takes those counters. Otherwise, the player lifts the counters in the hole in which the final counter lands and continues sowing. Play ends when one player can no longer move. The player with the most counters wins. | (game "Obridje" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(> (count at:(from)) 0)) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow apply:(if (and (!= 4 (count at:(to))) (< 1 (count at:(to)))) (and (moveAgain) (set Var "Replay" (to))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(var "NumSowed"))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (if (is In (to) (sites P1)) (mapEntry P1) (mapEntry P2))) count:4))) (set Var "NumSowed" 0))))))) (end (if (no Moves Next) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
2x6 board with two stores. Four counters in each hole. Play may begin from any of the player's holes. Counters are sown anti-clockwise. If the last counter falls into an empty hole or a hole in either row, making that hole contain four counters, play ends, and the four counters are taken. Also, if at any time during the sowing a hole contains four counters, the player on whose row this occurs takes those counters. Otherwise, the player lifts the counters in the hole in which the final counter lands and continues sowing. Play ends when one player can no longer move. The player with the most counters wins.
###Ludii
(game "Obridje" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start (set Count 4 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(> (count at:(from)) 0)) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow apply:(if (and (!= 4 (count at:(to))) (< 1 (count at:(to)))) (and (moveAgain) (set Var "Replay" (to))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(var "NumSowed"))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (if (is In (to) (sites P1)) (mapEntry P1) (mapEntry P2))) count:4))) (set Var "NumSowed" 0))))))) (end (if (no Moves Next) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
2x10-20 board, 10 most common. Opening arrangement: Each player has this opening arrangement (number of counters in each hole, starting from the leftmost hole): 5-5-5-5-5-5-5-1-1-5-1-0-0-0-0-0-0-0-0-0. Boards have even numbers of holes, and the farthest left and farthest right holes are eliminated in succession from this opening arrangement to make smaller boards. The challenger concedes the first move. Opening phase: Player 1 removes the counters in the opponent's final four holes with counters and conceals them from the opponent. Player 2 removes the same counters, except leaving the single counter in the opponent's final hole with counters. Players take the counters from any of their holes and sow them in an anti-clockwise direction. When sowing, the first counter is dropped into the hole from which it just came, unless it is a single counter. If the last counter lands in the opponent's row and the opposite hole contains one, three, or five counters, theses are taken and added to the concealed store. In place of a move, a player may add some or all of the counters from the concealed store, sowing from the leftmost hole in their row. If the sowing reaches the rightmost hole in this row, sowing continues from the leftmost hole rather than continuing into the opponent's rows. Each row has 10 holes. | (game "Okwe (Nigeria)" (players 2) (equipment {(mancalaBoard 2 10 store:None {(track "Track" "0,E,N,W" loop:True) (track "TrackSpecialHome1" "0,E" loop:True P1) (track "TrackSpecialHome2" "19,W" loop:True P2)}) (regions "OpeningRegion" P1 (sites {14 15 16 17})) (regions "OpeningRegion" P2 (sites {2 3 4})) (piece "Seed" Shared) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 (- (* 10 2) 1))}) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top))}) (rules (start {(set Count 5 to:(sites {0 1 4 19 18 15})) (set Count 1 to:(sites {2 3 5 17 16 14}))}) phases:{(phase "Opening" (play (move (from (sites Mover "OpeningRegion") if:(is Occupied (from))) (to (handSite Mover)) count:(count at:(from)))) (nextPhase (all Sites (union (sites P1 "OpeningRegion") (sites P2 "OpeningRegion")) if:(is Empty (site))) "Sowing")) (phase "Sowing" (play (or (move Select (from (sites Mover "Home") if:(is Occupied (from))) (then (sow "Track" apply:(if (and (is In (to) (sites Next "Home")) (or {(= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 10) (- (to) 10)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 10) (- (to) 10)))) (= 5 (count at:(if (is In (to) (sites Bottom)) (+ (to) 10) (- (to) 10))))})) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 10) (- (to) 10))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 10) (- (to) 10))))) origin:(< 1 (count at:(from)))))) (if (is Occupied Cell (handSite Mover)) (do (set Var "NumToSow" (count Cell at:(handSite Mover))) next:(move (from (handSite Mover)) (to (mapEntry "LeftMost" Mover)) count:(count Cell at:(handSite Mover)) (then (and (sow count:(var "NumToSow") "TrackSpecialHome" owner:(mover) origin:True) (set Var "NumToSow" 0)))))))))} (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (is Empty (handSite P1)) (result P2 Win)) (if (is Empty (handSite P2)) (result P1 Win))})))) | ###Description
2x10-20 board, 10 most common. Opening arrangement: Each player has this opening arrangement (number of counters in each hole, starting from the leftmost hole): 5-5-5-5-5-5-5-1-1-5-1-0-0-0-0-0-0-0-0-0. Boards have even numbers of holes, and the farthest left and farthest right holes are eliminated in succession from this opening arrangement to make smaller boards. The challenger concedes the first move. Opening phase: Player 1 removes the counters in the opponent's final four holes with counters and conceals them from the opponent. Player 2 removes the same counters, except leaving the single counter in the opponent's final hole with counters. Players take the counters from any of their holes and sow them in an anti-clockwise direction. When sowing, the first counter is dropped into the hole from which it just came, unless it is a single counter. If the last counter lands in the opponent's row and the opposite hole contains one, three, or five counters, theses are taken and added to the concealed store. In place of a move, a player may add some or all of the counters from the concealed store, sowing from the leftmost hole in their row. If the sowing reaches the rightmost hole in this row, sowing continues from the leftmost hole rather than continuing into the opponent's rows. Each row has 10 holes.
###Ludii
(game "Okwe (Nigeria)" (players 2) (equipment {(mancalaBoard 2 10 store:None {(track "Track" "0,E,N,W" loop:True) (track "TrackSpecialHome1" "0,E" loop:True P1) (track "TrackSpecialHome2" "19,W" loop:True P2)}) (regions "OpeningRegion" P1 (sites {14 15 16 17})) (regions "OpeningRegion" P2 (sites {2 3 4})) (piece "Seed" Shared) (hand Each) (map "LeftMost" {(pair P1 0) (pair P2 (- (* 10 2) 1))}) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top))}) (rules (start {(set Count 5 to:(sites {0 1 4 19 18 15})) (set Count 1 to:(sites {2 3 5 17 16 14}))}) phases:{(phase "Opening" (play (move (from (sites Mover "OpeningRegion") if:(is Occupied (from))) (to (handSite Mover)) count:(count at:(from)))) (nextPhase (all Sites (union (sites P1 "OpeningRegion") (sites P2 "OpeningRegion")) if:(is Empty (site))) "Sowing")) (phase "Sowing" (play (or (move Select (from (sites Mover "Home") if:(is Occupied (from))) (then (sow "Track" apply:(if (and (is In (to) (sites Next "Home")) (or {(= 1 (count at:(if (is In (to) (sites Bottom)) (+ (to) 10) (- (to) 10)))) (= 3 (count at:(if (is In (to) (sites Bottom)) (+ (to) 10) (- (to) 10)))) (= 5 (count at:(if (is In (to) (sites Bottom)) (+ (to) 10) (- (to) 10))))})) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 10) (- (to) 10))) (to (handSite Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 10) (- (to) 10))))) origin:(< 1 (count at:(from)))))) (if (is Occupied Cell (handSite Mover)) (do (set Var "NumToSow" (count Cell at:(handSite Mover))) next:(move (from (handSite Mover)) (to (mapEntry "LeftMost" Mover)) count:(count Cell at:(handSite Mover)) (then (and (sow count:(var "NumToSow") "TrackSpecialHome" owner:(mover) origin:True) (set Var "NumToSow" 0)))))))))} (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (is Empty (handSite P1)) (result P2 Win)) (if (is Empty (handSite P2)) (result P1 Win))})))) |
2x7 board. Six counters in each hole, except the central hole in each row, which contains one counter. Sowing occurs in an anti-clockwise direction. When the last counter is sown, the player picks up the counters in the next hole in the direction of the sowing and continues sowing with those counters. When the hole after the hole in which the final counter is sown is empty, the counters in the next hole are captured, as well as the counters in the hole opposite this hole, and the turn ends. Sowing cannot begin from the central hole of either row. When a capture would occur from one of these central holes, the counters are not captured until the end of the round. At the end of the round, if both players are eligible to capture from the hole, they split the counters, leaving one in the hole if it is an odd number, or two if it is an even number. If only one player captured from the holes, they leave one counter in each hole. If neither player made a capture from the hole, the counters remain in the hole. When the players can no longer play, a new round begins. Each player then fills up as many holes, not counting the central holes, on their side of the board with six counters if possible. Any holes that do not contain counters are out of play. Play continues until one player captures all the counters, and is the winner. | (game "Omangunta Peeta" (players 2) (equipment {(mancalaBoard 2 7 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start {(set Count 6 to:(difference (sites Track) (sites Centre))) (set Count 1 to:(sites Centre)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (difference (sites Mover) (sites Centre))) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow apply:(if (is Occupied (trackSite Move from:(to) "Track" steps:1)) (and (moveAgain) (set Var "Replay" (to))) (if (is In (trackSite Move from:(to) "Track" steps:2) (sites Centre)) (set Value Mover 1) (and (if (is Occupied (trackSite Move from:(to) "Track" steps:2)) (fromTo (from (trackSite Move from:(to) "Track" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "Track" steps:2)))) (if (is Occupied (if (is In (trackSite Move from:(to) "Track" steps:2) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:2) 7) (- (trackSite Move from:(to) "Track" steps:2) 7))) (fromTo (from (if (is In (trackSite Move from:(to) "Track" steps:2) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:2) 7) (- (trackSite Move from:(to) "Track" steps:2) 7))) (to (handSite Mover)) count:(count at:(if (is In (trackSite Move from:(to) "Track" steps:2) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:2) 7) (- (trackSite Move from:(to) "Track" steps:2) 7)))))))) skipIf:(and (not (is In (to) (sites Centre))) (not (is In (to) (sites (values Remembered "Playable"))))))))} (then (if (all Sites (difference (sites Board) (sites Centre)) if:(= 0 (count at:(site)))) (and {(forget Value "Playable" All) (if (!= 0 (+ (count at:3) (count at:10))) (if (and (= 1 (value Player P1)) (= 1 (value Player P2))) (if (is Even (+ (count at:3) (count at:10))) (and {(fromTo (from 3) (to Cell (handSite P1)) count:(- (count at:3) 1)) (fromTo (from 10) (to Cell (handSite P1)) count:(- (count at:10) 1)) (fromTo (from Cell (handSite P1)) (to Cell (handSite P2)) count:(/ (- (+ (count at:3) (count at:10)) 2) 2))}) (and {(fromTo (from 3) (to Cell (handSite P1)) count:(- (count at:3) 1)) (fromTo (from 10) (to Cell (handSite P1)) count:(count at:10)) (fromTo (from Cell (handSite P1)) (to Cell (handSite P2)) count:(/ (- (+ (count at:3) (count at:10)) 1) 2))})) (if (= 1 (value Player P1)) (and (fromTo (from 3) (to Cell (handSite P1)) count:(- (count at:3) 1)) (fromTo (from 10) (to Cell (handSite P1)) count:(- (count at:10) 1))) (if (= 1 (value Player P2)) (and (fromTo (from 3) (to Cell (handSite P2)) count:(- (count at:3) 1)) (fromTo (from 10) (to Cell (handSite P2)) count:(- (count at:10) 1)))))))}))))) (end (if (all Sites (difference (sites Board) (sites Centre)) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (difference (sites Board) (sites Centre)) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (difference (sites Mover) (sites Centre)) if:(is Occupied (site)))) (if (<= 6 (count Cell at:(handSite Mover))) (move (from Cell (handSite Mover)) (to (difference (sites Mover) (sites Centre)) if:(is Empty (to))) count:6 (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x7 board. Six counters in each hole, except the central hole in each row, which contains one counter. Sowing occurs in an anti-clockwise direction. When the last counter is sown, the player picks up the counters in the next hole in the direction of the sowing and continues sowing with those counters. When the hole after the hole in which the final counter is sown is empty, the counters in the next hole are captured, as well as the counters in the hole opposite this hole, and the turn ends. Sowing cannot begin from the central hole of either row. When a capture would occur from one of these central holes, the counters are not captured until the end of the round. At the end of the round, if both players are eligible to capture from the hole, they split the counters, leaving one in the hole if it is an odd number, or two if it is an even number. If only one player captured from the holes, they leave one counter in each hole. If neither player made a capture from the hole, the counters remain in the hole. When the players can no longer play, a new round begins. Each player then fills up as many holes, not counting the central holes, on their side of the board with six counters if possible. Any holes that do not contain counters are out of play. Play continues until one player captures all the counters, and is the winner.
###Ludii
(game "Omangunta Peeta" (players 2) (equipment {(mancalaBoard 2 7 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start {(set Count 6 to:(difference (sites Track) (sites Centre))) (set Count 1 to:(sites Centre)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (difference (sites Mover) (sites Centre))) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow apply:(if (is Occupied (trackSite Move from:(to) "Track" steps:1)) (and (moveAgain) (set Var "Replay" (to))) (if (is In (trackSite Move from:(to) "Track" steps:2) (sites Centre)) (set Value Mover 1) (and (if (is Occupied (trackSite Move from:(to) "Track" steps:2)) (fromTo (from (trackSite Move from:(to) "Track" steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) "Track" steps:2)))) (if (is Occupied (if (is In (trackSite Move from:(to) "Track" steps:2) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:2) 7) (- (trackSite Move from:(to) "Track" steps:2) 7))) (fromTo (from (if (is In (trackSite Move from:(to) "Track" steps:2) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:2) 7) (- (trackSite Move from:(to) "Track" steps:2) 7))) (to (handSite Mover)) count:(count at:(if (is In (trackSite Move from:(to) "Track" steps:2) (sites Bottom)) (+ (trackSite Move from:(to) "Track" steps:2) 7) (- (trackSite Move from:(to) "Track" steps:2) 7)))))))) skipIf:(and (not (is In (to) (sites Centre))) (not (is In (to) (sites (values Remembered "Playable"))))))))} (then (if (all Sites (difference (sites Board) (sites Centre)) if:(= 0 (count at:(site)))) (and {(forget Value "Playable" All) (if (!= 0 (+ (count at:3) (count at:10))) (if (and (= 1 (value Player P1)) (= 1 (value Player P2))) (if (is Even (+ (count at:3) (count at:10))) (and {(fromTo (from 3) (to Cell (handSite P1)) count:(- (count at:3) 1)) (fromTo (from 10) (to Cell (handSite P1)) count:(- (count at:10) 1)) (fromTo (from Cell (handSite P1)) (to Cell (handSite P2)) count:(/ (- (+ (count at:3) (count at:10)) 2) 2))}) (and {(fromTo (from 3) (to Cell (handSite P1)) count:(- (count at:3) 1)) (fromTo (from 10) (to Cell (handSite P1)) count:(count at:10)) (fromTo (from Cell (handSite P1)) (to Cell (handSite P2)) count:(/ (- (+ (count at:3) (count at:10)) 1) 2))})) (if (= 1 (value Player P1)) (and (fromTo (from 3) (to Cell (handSite P1)) count:(- (count at:3) 1)) (fromTo (from 10) (to Cell (handSite P1)) count:(- (count at:10) 1))) (if (= 1 (value Player P2)) (and (fromTo (from 3) (to Cell (handSite P2)) count:(- (count at:3) 1)) (fromTo (from 10) (to Cell (handSite P2)) count:(- (count at:10) 1)))))))}))))) (end (if (all Sites (difference (sites Board) (sites Centre)) if:(= 0 (count at:(site)))) {(if (= 0 (count Cell at:(handSite P1))) (result P2 Win)) (if (= 0 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (difference (sites Board) (sites Centre)) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (difference (sites Mover) (sites Centre)) if:(is Occupied (site)))) (if (<= 6 (count Cell at:(handSite Mover))) (move (from Cell (handSite Mover)) (to (difference (sites Mover) (sites Centre)) if:(is Empty (to))) count:6 (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "Sowing"))})) |
Two rows of four piles. Six counters in each pile. A player picks up the counters in one of her piles and sows them anti-clockwise, beginning in the place from which the pile originated. Any piles containing 2, 4, or 6 counters at the end of sowing are captured. Play continues until all of the counters have been captured. The player who captures the most counters wins. | (game "Oure Ngat" (players 2) (equipment {(mancalaBoard 2 4 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (hand Each)}) (rules (start (set Count 6 to:(sites Track))) (play (move Select (from (sites Mover "Home") if:(> (count at:(from)) 0)) (then (sow origin:True (then (forEach Site (sites Track) (if (is In (count at:(site)) (sites {2 4 6})) (fromTo (from (site)) (to (handSite Mover)) count:(count at:(site)))))))))) (end (if (= 0 (count in:(sites Track))) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) | ###Description
Two rows of four piles. Six counters in each pile. A player picks up the counters in one of her piles and sows them anti-clockwise, beginning in the place from which the pile originated. Any piles containing 2, 4, or 6 counters at the end of sowing are captured. Play continues until all of the counters have been captured. The player who captures the most counters wins.
###Ludii
(game "Oure Ngat" (players 2) (equipment {(mancalaBoard 2 4 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (hand Each)}) (rules (start (set Count 6 to:(sites Track))) (play (move Select (from (sites Mover "Home") if:(> (count at:(from)) 0)) (then (sow origin:True (then (forEach Site (sites Track) (if (is In (count at:(site)) (sites {2 4 6})) (fromTo (from (site)) (to (handSite Mover)) count:(count at:(site)))))))))) (end (if (= 0 (count in:(sites Track))) (byScore {(score P1 (count Cell at:(handSite P1))) (score P2 (count Cell at:(handSite P2)))}))))) |
2x8 board, with a store on either end. Each player owns the store to their right. Eight counters in each hole. Players alternate turns sowing in an anti-clockwise direction from one of the holes on their side of the board. Sowing always includes the player's store (but not the opponent's store), and sowing cannot begin from the store. When the final counter lands in an occupied hole, the contents of that hole are picked up and sowing continues. If the last counter lands in the player's store, they may choose any of the holes on their side of the board and continue sowing from it. When the final counter lands in an empty hole, the counters in the opposite hole are captured. Play continues until all of the counters are captured. A new round begins. Players fill the holes on their side of the board with their captured counters. If a player cannot fill a hole with the required number of counters, the hole is closed and is out of play for that round. Play continues as before. Play continues in successive rounds until one player closes all of their opponent's holes and wins. | (game "Ovalhu" (players 2) (equipment {(mancalaBoard 2 8 {(track "Track1" "1,E,17,16,W" loop:True P1) (track "Track2" "1,E,N,W,0" loop:True P2)}) (piece "Seed" Shared) (map {(pair P1 LastSite) (pair P2 FirstSite)}) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(set RememberValue "Playable" (union (sites Top) (sites Bottom))) (set Count 8 to:(union (sites Bottom) (sites Top)))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (and (is Pending) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow "Track" owner:(mover) apply:(if (or (is In (to) (sites {(mapEntry P1) (mapEntry P2)})) (< 1 (count at:(to)))) (and (moveAgain) (if (not (is In (to) (sites {(mapEntry P1) (mapEntry P2)}))) (and (set Pending) (set Var "Replay" (to))))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))) (to (mapEntry Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))))) skipIf:(and (not (is In (to) (sites {(mapEntry P1) (mapEntry P2)}))) (not (is In (to) (sites (values Remembered "Playable"))))))))} (then (if (no Pieces All in:(union (sites Top) (sites Bottom))) (forget Value "Playable" All))))) (end (if (no Pieces All in:(union (sites Top) (sites Bottom))) {(if (> 8 (count at:(mapEntry P1))) (result P2 Win)) (if (> 8 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (no Pieces All in:(union (sites Top) (sites Bottom))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 8 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (sites Mover) if:(is Empty (to))) count:8 (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x8 board, with a store on either end. Each player owns the store to their right. Eight counters in each hole. Players alternate turns sowing in an anti-clockwise direction from one of the holes on their side of the board. Sowing always includes the player's store (but not the opponent's store), and sowing cannot begin from the store. When the final counter lands in an occupied hole, the contents of that hole are picked up and sowing continues. If the last counter lands in the player's store, they may choose any of the holes on their side of the board and continue sowing from it. When the final counter lands in an empty hole, the counters in the opposite hole are captured. Play continues until all of the counters are captured. A new round begins. Players fill the holes on their side of the board with their captured counters. If a player cannot fill a hole with the required number of counters, the hole is closed and is out of play for that round. Play continues as before. Play continues in successive rounds until one player closes all of their opponent's holes and wins.
###Ludii
(game "Ovalhu" (players 2) (equipment {(mancalaBoard 2 8 {(track "Track1" "1,E,17,16,W" loop:True P1) (track "Track2" "1,E,N,W,0" loop:True P2)}) (piece "Seed" Shared) (map {(pair P1 LastSite) (pair P2 FirstSite)}) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(set RememberValue "Playable" (union (sites Top) (sites Bottom))) (set Count 8 to:(union (sites Bottom) (sites Top)))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (and (is Pending) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (sow "Track" owner:(mover) apply:(if (or (is In (to) (sites {(mapEntry P1) (mapEntry P2)})) (< 1 (count at:(to)))) (and (moveAgain) (if (not (is In (to) (sites {(mapEntry P1) (mapEntry P2)}))) (and (set Pending) (set Var "Replay" (to))))) (if (is Occupied (if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))) (fromTo (from (if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8))) (to (mapEntry Mover)) count:(count at:(if (is In (to) (sites Bottom)) (+ (to) 8) (- (to) 8)))))) skipIf:(and (not (is In (to) (sites {(mapEntry P1) (mapEntry P2)}))) (not (is In (to) (sites (values Remembered "Playable"))))))))} (then (if (no Pieces All in:(union (sites Top) (sites Bottom))) (forget Value "Playable" All))))) (end (if (no Pieces All in:(union (sites Top) (sites Bottom))) {(if (> 8 (count at:(mapEntry P1))) (result P2 Win)) (if (> 8 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (no Pieces All in:(union (sites Top) (sites Bottom))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 8 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (sites Mover) if:(is Empty (to))) count:8 (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "Sowing"))})) |
2x6 board, with a storage hole on either end. The game starts with four counters in each hole. A player picks up all of the counters in one of the holes in their row and sows them one-by-one in a counterclockwise direction in consecutive holes from the hole the pieces originated. The starting hole is always left empty, even if a player sows in a complete circuit of the board, the original house is skipped and sowing continues in the next hole after it. Players capture counters when the final counter is sown in the opponent's row and the hole containing it has two or three counters (counting the counter just dropped into it). If the hole before it also has two or three counters, these are also captured and so on until reaching a hole without two or three counters or one not belonging to the opponent. A move which would capture all of the opponent's counters is not allowed. If an opponent's holes are all empty, the other player must make a move placing counters in the opponent's row. If not possible, the player captures all the counters in their row. Play continues until all of the counters are captured. The player who has captured the most counters wins. If the game continues in a repeating loop, the players can agree to end the game and capture the counters remaining in their row. The game ended when a player has no piece on his side or if the two players are agree on the end of the game in case a cycle. | (game "Oware" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) (play (if (is Proposed "End") (or (move Vote "End") (move Vote "No")) (or (if (is Cycle) (move Propose "End")) (do (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow if:(and (is In (to) (sites Next)) (or (= (count at:(to)) 2) (= (count at:(to)) 3))) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) includeSelf:False backtracking:True))) ifAfterwards:(< 0 (count in:(sites Next))))))) (end (if (or (no Moves Mover) (is Decided "End")) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) | ###Description
2x6 board, with a storage hole on either end. The game starts with four counters in each hole. A player picks up all of the counters in one of the holes in their row and sows them one-by-one in a counterclockwise direction in consecutive holes from the hole the pieces originated. The starting hole is always left empty, even if a player sows in a complete circuit of the board, the original house is skipped and sowing continues in the next hole after it. Players capture counters when the final counter is sown in the opponent's row and the hole containing it has two or three counters (counting the counter just dropped into it). If the hole before it also has two or three counters, these are also captured and so on until reaching a hole without two or three counters or one not belonging to the opponent. A move which would capture all of the opponent's counters is not allowed. If an opponent's holes are all empty, the other player must make a move placing counters in the opponent's row. If not possible, the player captures all the counters in their row. Play continues until all of the counters are captured. The player who has captured the most counters wins. If the game continues in a repeating loop, the players can agree to end the game and capture the counters remaining in their row. The game ended when a player has no piece on his side or if the two players are agree on the end of the game in case a cycle.
###Ludii
(game "Oware" (players 2) (equipment {(mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (piece "Seed" Shared)}) (rules (start (set Count 4 to:(sites Track))) (play (if (is Proposed "End") (or (move Vote "End") (move Vote "No")) (or (if (is Cycle) (move Propose "End")) (do (move Select (from (sites Mover) if:(< 0 (count at:(from)))) (then (sow if:(and (is In (to) (sites Next)) (or (= (count at:(to)) 2) (= (count at:(to)) 3))) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to))) includeSelf:False backtracking:True))) ifAfterwards:(< 0 (count in:(sites Next))))))) (end (if (or (no Moves Mover) (is Decided "End")) (byScore {(score P1 (+ (count at:(mapEntry P1)) (count in:(sites P1)))) (score P2 (+ (count at:(mapEntry P2)) (count in:(sites P2))))}))))) |
2x5 board. Five counters in each hole. Sowing occurs in an anti-clockwise direction. When the final counters of a sowing lands in a hole, the contents of the next hole are picked up and sowing continues. When the final counter lands in a hole, and the next hole, from which sowing would normally continue, is empty, the player captures any counters in the next hole after the empty one. and the turn ends. Play continues until no more captures are possible, and the player who captured the most counters wins. | (game "Pachgarhwa" (players 2) (equipment {(mancalaBoard 2 5 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 5 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(value Pending)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow if:True apply:(if (is Occupied (trackSite Move from:(to) steps:1)) (and {(set Pending (to)) (fromTo (from (trackSite Move from:(to) steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) steps:1))) (moveAgain)}) (if (is Occupied (trackSite Move from:(to) steps:2)) (fromTo (from (trackSite Move from:(to) steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) steps:2))))))))) (end (if (= 1 (count in:(sites Board))) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) | ###Description
2x5 board. Five counters in each hole. Sowing occurs in an anti-clockwise direction. When the final counters of a sowing lands in a hole, the contents of the next hole are picked up and sowing continues. When the final counter lands in a hole, and the next hole, from which sowing would normally continue, is empty, the player captures any counters in the next hole after the empty one. and the turn ends. Play continues until no more captures are possible, and the player who captured the most counters wins.
###Ludii
(game "Pachgarhwa" (players 2) (equipment {(mancalaBoard 2 5 store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start (set Count 5 to:(sites Track))) (play (move Select (from (if (is Prev Mover) (sites {(value Pending)}) (sites Mover)) if:(> (count at:(from)) 0)) (then (sow if:True apply:(if (is Occupied (trackSite Move from:(to) steps:1)) (and {(set Pending (to)) (fromTo (from (trackSite Move from:(to) steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) steps:1))) (moveAgain)}) (if (is Occupied (trackSite Move from:(to) steps:2)) (fromTo (from (trackSite Move from:(to) steps:2)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) steps:2))))))))) (end (if (= 1 (count in:(sites Board))) (byScore {(score P1 (+ (count Cell at:(handSite P1)) (count in:(sites P1)))) (score P2 (+ (count Cell at:(handSite P2)) (count in:(sites P2))))}))))) |
2x7 board. Six counters in each hole. Play begins from any one of a player's holes, even if there is just one. Sowing occurs in an anti-clockwise direction. If they end in a hole with counters, these are picked up and sowing continues. If sowing ends in an empty hole, the contents of the next hole are captured and the turn ends. When sowing, if the contents of a hole are brought to four, they are immediately captured by the player in whose row the counters are located. Play ends when a player has no counters in their holes, remaining player takes all the remaining counters. In the next round, the player with the smaller number of counters captured from the previous round fills as many of their holes as they can, starting from the left and filling each hole with six counters. Leftover counters are placed in the player's store. The opponent then does the same. Any holes remaining empty are out of play for this round, otherwise play continues as before. The right to begin alternates from round to round. Further rounds are played until one player has fewer than six counters. | (game "Pallankuli" (players 2) (equipment {(mancalaBoard 2 7 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "LeftMost" {(pair P1 0) (pair P2 13)}) (hand Each)}) (rules (start {(set Count 6 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow apply:(if (and (!= 4 (count at:(to))) (< 1 (count at:(to)))) (and (moveAgain) (set Var "Replay" (to))) (if (= 1 (count at:(to))) (if (is Occupied (trackSite Move from:(to) steps:1)) (fromTo (from (trackSite Move from:(to) steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) steps:1)))))) skipIf:(not (is In (to) (sites (values Remembered "Playable"))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(var "NumSowed"))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (if (is In (to) (sites P1)) (handSite P1) (handSite P2))) count:4))) (set Var "NumSowed" 0))))))} (then (if (or (all Sites (sites Bottom) if:(= 0 (count at:(site)))) (all Sites (sites Top) if:(= 0 (count at:(site))))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forget Value "Playable" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 6 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 6 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 6 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to))) if:(is In (to) (sites Mover))) count:6 (then (remember Value "Playable" (last To)))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x7 board. Six counters in each hole. Play begins from any one of a player's holes, even if there is just one. Sowing occurs in an anti-clockwise direction. If they end in a hole with counters, these are picked up and sowing continues. If sowing ends in an empty hole, the contents of the next hole are captured and the turn ends. When sowing, if the contents of a hole are brought to four, they are immediately captured by the player in whose row the counters are located. Play ends when a player has no counters in their holes, remaining player takes all the remaining counters. In the next round, the player with the smaller number of counters captured from the previous round fills as many of their holes as they can, starting from the left and filling each hole with six counters. Leftover counters are placed in the player's store. The opponent then does the same. Any holes remaining empty are out of play for this round, otherwise play continues as before. The right to begin alternates from round to round. Further rounds are played until one player has fewer than six counters.
###Ludii
(game "Pallankuli" (players 2) (equipment {(mancalaBoard 2 7 store:None (track "Track" "0,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "LeftMost" {(pair P1 0) (pair P2 13)}) (hand Each)}) (rules (start {(set Count 6 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or {(move Select (from (if (is Prev Mover) (sites {(var "Replay")}) (sites Mover)) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (do (set Var "NumSowed" (count at:(last To))) next:(sow apply:(if (and (!= 4 (count at:(to))) (< 1 (count at:(to)))) (and (moveAgain) (set Var "Replay" (to))) (if (= 1 (count at:(to))) (if (is Occupied (trackSite Move from:(to) steps:1)) (fromTo (from (trackSite Move from:(to) steps:1)) (to (handSite Mover)) count:(count at:(trackSite Move from:(to) steps:1)))))) skipIf:(not (is In (to) (sites (values Remembered "Playable"))))) (then (and (forEach Site (sites Track from:(last From) to:(trackSite Move from:(last From) "Track" steps:(var "NumSowed"))) (if (= 4 (count at:(site))) (fromTo (from (site)) (to (if (is In (to) (sites P1)) (handSite P1) (handSite P2))) count:4))) (set Var "NumSowed" 0))))))} (then (if (or (all Sites (sites Bottom) if:(= 0 (count at:(site)))) (all Sites (sites Top) if:(= 0 (count at:(site))))) (and {(forEach Site (sites P1) (fromTo (from (site)) (to (handSite P1)) count:(count at:(site)))) (forEach Site (sites P2) (fromTo (from (site)) (to (handSite P2)) count:(count at:(site)))) (forget Value "Playable" All)}))))) (end (if (all Sites (sites Board) if:(= 0 (count at:(site)))) {(if (> 6 (count Cell at:(handSite P1))) (result P2 Win)) (if (> 6 (count Cell at:(handSite P2))) (result P1 Win))})) (nextPhase (all Sites (sites Board) if:(= 0 (count at:(site)))) "BetweenRounds")) (phase "BetweenRounds" (play (if (<= 6 (count Cell at:(handSite Mover))) (move (from (handSite Mover)) (to (trackSite FirstSite from:(mapEntry "LeftMost" Mover) if:(is Empty (to))) if:(is In (to) (sites Mover))) count:6 (then (remember Value "Playable" (last To)))))) (nextPhase (all Passed) "Sowing"))})) |
2x7 board, with one store at either end. Each player owns the store to their left. Seven counters in each hole. The first turn is played simultaneously by both players; at the point which one player's sowing lasts longer than the others, the player whose turn was shorter plays next and turns alternate from this point. Players sow in a clockwise direction from one of the holes in their row, also sowing into their store, but not in their opponent's store. When the final counter lands in an empty hole or in the store, the turn ends. When the final counter falls into an occupied hole, the player picks up the contents of this hole and continues to sow. If this occupied hole is in the player's row, they have the option to instead place the final counter in the opposite hole in the opponent's row, and to place this last counter as well as the contents of that hole into the store. When all of the counters are in the stores, a new game begins. The players take the counters from their stores and place seven in each hole, beginning from their right. Any player which cannot fill a hole with seven counters places the remaining counters in their store. Any holes which are left empty are out of play for this game. Play continues as before. Multiple games are played like this until all of the holes on one side are left empty. This player loses. | (game "Papan Dakon" (players 2) (equipment {(mancalaBoard 2 7 {(track "Track1" "0,8,E,S,W" loop:True P1) (track "Track2" "15,7,W,N,E" loop:True P2)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (map "RightMost" {(pair P1 7) (pair P2 8)})}) (rules (start {(set Count 7 to:(union (sites P1) (sites P2))) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(and (> (count at:(from)) 0) (is In (from) (sites (values Remembered "Playable"))))) (then (sow "Track" owner:(mover) apply:(if (and (!= (to) (mapEntry Mover)) (< 1 (count at:(to)))) (moveAgain)) skipIf:(if (!= (to) (mapEntry Mover)) (not (is In (to) (sites (values Remembered "Playable")))))))) (if (and (is In (last To afterConsequence:True) (sites Mover)) (is Prev Mover)) (if (is In (last To afterConsequence:True) (sites (values Remembered "Playable"))) (move (from (last To afterConsequence:True)) (to (if (is Mover P1) (+ (last To afterConsequence:True) 7) (- (last To afterConsequence:True) 7))) count:1 (then (fromTo (from (last To)) (to (mapEntry Mover)) count:(count at:(last To))))))) (then (if (all Sites (union (sites Top) (sites Bottom)) if:(is Empty (site))) (forget Value "Playable" All))))) (end (if (all Sites (union (sites Top) (sites Bottom)) if:(is Empty (site))) {(if (> 7 (count at:(mapEntry P1))) (result P2 Win)) (if (> 7 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (all Sites (union (sites Top) (sites Bottom)) if:(is Empty (site))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 7 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (trackSite FirstSite from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:7 (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "Sowing"))})) | ###Description
2x7 board, with one store at either end. Each player owns the store to their left. Seven counters in each hole. The first turn is played simultaneously by both players; at the point which one player's sowing lasts longer than the others, the player whose turn was shorter plays next and turns alternate from this point. Players sow in a clockwise direction from one of the holes in their row, also sowing into their store, but not in their opponent's store. When the final counter lands in an empty hole or in the store, the turn ends. When the final counter falls into an occupied hole, the player picks up the contents of this hole and continues to sow. If this occupied hole is in the player's row, they have the option to instead place the final counter in the opposite hole in the opponent's row, and to place this last counter as well as the contents of that hole into the store. When all of the counters are in the stores, a new game begins. The players take the counters from their stores and place seven in each hole, beginning from their right. Any player which cannot fill a hole with seven counters places the remaining counters in their store. Any holes which are left empty are out of play for this game. Play continues as before. Multiple games are played like this until all of the holes on one side are left empty. This player loses.
###Ludii
(game "Papan Dakon" (players 2) (equipment {(mancalaBoard 2 7 {(track "Track1" "0,8,E,S,W" loop:True P1) (track "Track2" "15,7,W,N,E" loop:True P2)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) (map "RightMost" {(pair P1 7) (pair P2 8)})}) (rules (start {(set Count 7 to:(union (sites P1) (sites P2))) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "Sowing" (play (or (move Select (from (if (is Prev Mover) (sites {(last To afterConsequence:True)}) (sites Mover)) if:(and (> (count at:(from)) 0) (is In (from) (sites (values Remembered "Playable"))))) (then (sow "Track" owner:(mover) apply:(if (and (!= (to) (mapEntry Mover)) (< 1 (count at:(to)))) (moveAgain)) skipIf:(if (!= (to) (mapEntry Mover)) (not (is In (to) (sites (values Remembered "Playable")))))))) (if (and (is In (last To afterConsequence:True) (sites Mover)) (is Prev Mover)) (if (is In (last To afterConsequence:True) (sites (values Remembered "Playable"))) (move (from (last To afterConsequence:True)) (to (if (is Mover P1) (+ (last To afterConsequence:True) 7) (- (last To afterConsequence:True) 7))) count:1 (then (fromTo (from (last To)) (to (mapEntry Mover)) count:(count at:(last To))))))) (then (if (all Sites (union (sites Top) (sites Bottom)) if:(is Empty (site))) (forget Value "Playable" All))))) (end (if (all Sites (union (sites Top) (sites Bottom)) if:(is Empty (site))) {(if (> 7 (count at:(mapEntry P1))) (result P2 Win)) (if (> 7 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (all Sites (union (sites Top) (sites Bottom)) if:(is Empty (site))) "BetweenRounds")) (phase "BetweenRounds" (play (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (if (<= 7 (count at:(mapEntry Mover))) (move (from (mapEntry Mover)) (to (trackSite FirstSite from:(mapEntry "RightMost" Mover) if:(is Empty (to)))) count:7 (then (remember Value "Playable" (last To))))))) (nextPhase (all Passed) "Sowing"))})) |
2x7 board with two stores. Four counters in each hole. Sowing occurs in either a clockwise or anti-clockwise direction; the first player chooses the direction and all subsequent moves are made in that direction. Players sow beginning from holes in their row. In the course of sowing, a player cannot sow into a hole containing three counters; if one is encountered, it is skipped and the counter is sowed into the next hole without three. If the final counter falls into a hole containing three counters, the contents of the hole are captured and the contents of the next hole are picked up and sowing continues. Otherwise, if the last counter falls into a hole with counters, these are picked up and sowing continues, or if it falls into an empty hole the turn ends. Throughout the game, single counters cannot be moved if a player has a hole with multiple counters, and a single counter in the front hole cannot be moved if there are other single counters in the player's row. The round ends when one player's holes are empty. The player with counters remaining in their holes captures these counters. A second round begins with the winner of the first round placing four counters in each of their holes, leaving any surplus in the store. The loser of round one places four counters in as many consecutive holes on their side of the board as possible, and any remaining counters in the next hole. If this hole contains one, it is called puta, if two, naga, if three, wala. Holes with no counters are excluded from play for this round. If the loser has a puta hole, the opponent removes three counters from their hole opposite; if a naga, the opponent removes two from the opposite hole, if a wala, the opponent removes one. The removed counters go into their store. Puta and naga holes are marked with a piece of paper or straw in them. Empty holes are excluded from play in this round. The losing player begins the round, moving in the direction of the excluded holes, and played in the same way as the first round. The player with empty holes begins play in the direction of the empty hole. Counters cannot be captured or sowed from puta or naga holes. Play continues as before. When one player has fewer than twelve counters at the beginning of a round, they may arrange them differently at the beginning. They may put one or two counters in one end hole and not more than four in the other end hole, and one or two counters in the intermediate holes, leaving some empty and, thus, excluded. The opponent then puts four counters in each of their holes. There are no puta, naga, or wala holes in this round. The player with more counters plays as before, but the one with less has captures that are determined by the number of counters placed in the first end hole. If there were two in the end hole, the player captures when dropping the final counter into a hole to make it three; or when it makes two if there was one counter in the first end hole. Otherwise, the player does not sow in holes with one or two counters. Play continues until one player cannot sow at the beginning of a round. | (game "Puhulmutu" (players 2) (equipment {(mancalaBoard 2 7 {(track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "7,W,N,E" loop:True)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "StartingMove" (play (or (move Select (from (sites Mover) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (and (sow "TrackCCW" apply:(if (= 4 (count at:(to))) (and (if (!= 0 (count at:(trackSite Move from:(to) "TrackCCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCCW" steps:1)))) (fromTo (from (to)) (to (mapEntry Mover)) count:4)) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))) (set Var "Direction" 1)))) (move Select (from (sites Mover) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (and (sow "TrackCW" apply:(if (= 4 (count at:(to))) (and (if (!= 0 (count at:(trackSite Move from:(to) "TrackCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCW" steps:1)))) (fromTo (from (to)) (to (mapEntry Mover)) count:4)) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))) (set Var "Direction" 2)))))) (nextPhase "Sowing")) (phase "Sowing" (play (if (= 1 (var "Direction")) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (not (is In (from) (sites (values Remembered "Blocked")))) (if (not (all Sites (forEach (sites Mover) if:(is In (site) (sites (values Remembered "Playable")))) if:(>= 1 (count at:(site))))) (< 1 (count at:(from))))})) (then (sow "TrackCCW" apply:(if (= 4 (count at:(to))) (and (if (!= 0 (count at:(trackSite Move from:(to) "TrackCCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCCW" steps:1)))) (if (not (is In (to) (sites (values Remembered "Blocked")))) (fromTo (from (to)) (to (mapEntry Mover)) count:4))) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))))) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (not (is In (from) (sites (values Remembered "Blocked")))) (if (not (all Sites (forEach (sites Mover) if:(is In (site) (sites (values Remembered "Playable")))) if:(>= 1 (count at:(site))))) (< 1 (count at:(from))))})) (then (sow "TrackCW" apply:(if (= 4 (count at:(to))) (and (if (!= 0 (count at:(trackSite Move from:(to) "TrackCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCW" steps:1)))) (if (not (is In (to) (sites (values Remembered "Blocked")))) (fromTo (from (to)) (to (mapEntry Mover)) count:4))) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))))) (then (if (no Moves Next) (and {(forEach Site (sites P1) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))) (forget Value "Playable" All) (forget Value "Blocked" All) (if (< (+ (count at:(mapEntry P1)) (count in:(sites P1))) (+ (count at:(mapEntry P2)) (count in:(sites P2)))) (and (set NextPlayer (player 2)) (set Var "Winner" 2)) (and (set NextPlayer (player 1)) (set Var "Winner" 1)))}))))) (end (if (no Moves Next) {(if (> 2 (count at:(mapEntry P1))) (result P2 Win)) (if (> 2 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (no Moves Next) "BetweenRounds")) (phase "BetweenRounds" (play (if (and (not (is Prev Mover)) (!= (mover) (var "Winner"))) (or (move (from (mapEntry Mover)) (to (if (is Mover P1) (intersection (sites Bottom) (expand (sites Right))) (intersection (sites Top) (expand (sites Left)))) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (if (> 4 (count at:(last To))) (and (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (mapEntry Next)) count:(- 4 (count at:(last To)))) (remember Value "Blocked" (last To)))) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending)) (set Var "Direction" 2)}))) (move (from (mapEntry Mover)) (to (if (is Mover P1) (intersection (sites Bottom) (expand (sites Left))) (intersection (sites Top) (expand (sites Right)))) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (if (> 4 (count at:(last To))) (and (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (mapEntry Next)) count:(- 4 (count at:(last To)))) (remember Value "Blocked" (last To)))) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending)) (set Var "Direction" 1)})))) (if (!= (mover) (var "Winner")) (move (from (mapEntry Mover)) (to (if (= (var "Direction") 1) (trackSite Move from:(last To) "TrackCCW" steps:1) (trackSite Move from:(last To) "TrackCW" steps:1)) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending))}))) (move (from (mapEntry Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (and (remember Value "Playable" (last To)) (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (moveAgain)))))))) (nextPhase (and (!= (var "Winner") (mover)) (= 0 (count at:(mapEntry Mover)))) "Sowing"))})) | ###Description
2x7 board with two stores. Four counters in each hole. Sowing occurs in either a clockwise or anti-clockwise direction; the first player chooses the direction and all subsequent moves are made in that direction. Players sow beginning from holes in their row. In the course of sowing, a player cannot sow into a hole containing three counters; if one is encountered, it is skipped and the counter is sowed into the next hole without three. If the final counter falls into a hole containing three counters, the contents of the hole are captured and the contents of the next hole are picked up and sowing continues. Otherwise, if the last counter falls into a hole with counters, these are picked up and sowing continues, or if it falls into an empty hole the turn ends. Throughout the game, single counters cannot be moved if a player has a hole with multiple counters, and a single counter in the front hole cannot be moved if there are other single counters in the player's row. The round ends when one player's holes are empty. The player with counters remaining in their holes captures these counters. A second round begins with the winner of the first round placing four counters in each of their holes, leaving any surplus in the store. The loser of round one places four counters in as many consecutive holes on their side of the board as possible, and any remaining counters in the next hole. If this hole contains one, it is called puta, if two, naga, if three, wala. Holes with no counters are excluded from play for this round. If the loser has a puta hole, the opponent removes three counters from their hole opposite; if a naga, the opponent removes two from the opposite hole, if a wala, the opponent removes one. The removed counters go into their store. Puta and naga holes are marked with a piece of paper or straw in them. Empty holes are excluded from play in this round. The losing player begins the round, moving in the direction of the excluded holes, and played in the same way as the first round. The player with empty holes begins play in the direction of the empty hole. Counters cannot be captured or sowed from puta or naga holes. Play continues as before. When one player has fewer than twelve counters at the beginning of a round, they may arrange them differently at the beginning. They may put one or two counters in one end hole and not more than four in the other end hole, and one or two counters in the intermediate holes, leaving some empty and, thus, excluded. The opponent then puts four counters in each of their holes. There are no puta, naga, or wala holes in this round. The player with more counters plays as before, but the one with less has captures that are determined by the number of counters placed in the first end hole. If there were two in the end hole, the player captures when dropping the final counter into a hole to make it three; or when it makes two if there was one counter in the first end hole. Otherwise, the player does not sow in holes with one or two counters. Play continues until one player cannot sow at the beginning of a round.
###Ludii
(game "Puhulmutu" (players 2) (equipment {(mancalaBoard 2 7 {(track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "7,W,N,E" loop:True)}) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start {(set Count 4 to:(sites Track)) (set RememberValue "Playable" (union (sites Top) (sites Bottom)))}) phases:{(phase "StartingMove" (play (or (move Select (from (sites Mover) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (and (sow "TrackCCW" apply:(if (= 4 (count at:(to))) (and (if (!= 0 (count at:(trackSite Move from:(to) "TrackCCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCCW" steps:1)))) (fromTo (from (to)) (to (mapEntry Mover)) count:4)) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))) (set Var "Direction" 1)))) (move Select (from (sites Mover) if:(and (is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))))) (then (and (sow "TrackCW" apply:(if (= 4 (count at:(to))) (and (if (!= 0 (count at:(trackSite Move from:(to) "TrackCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCW" steps:1)))) (fromTo (from (to)) (to (mapEntry Mover)) count:4)) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))) (set Var "Direction" 2)))))) (nextPhase "Sowing")) (phase "Sowing" (play (if (= 1 (var "Direction")) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (not (is In (from) (sites (values Remembered "Blocked")))) (if (not (all Sites (forEach (sites Mover) if:(is In (site) (sites (values Remembered "Playable")))) if:(>= 1 (count at:(site))))) (< 1 (count at:(from))))})) (then (sow "TrackCCW" apply:(if (= 4 (count at:(to))) (and (if (!= 0 (count at:(trackSite Move from:(to) "TrackCCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCCW" steps:1)))) (if (not (is In (to) (sites (values Remembered "Blocked")))) (fromTo (from (to)) (to (mapEntry Mover)) count:4))) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))))) (move Select (from (if (and (not (is Pending)) (is Prev Mover)) (sites {(var "Replay")}) (sites Mover)) if:(and {(is Occupied (from)) (is In (from) (sites (values Remembered "Playable"))) (not (is In (from) (sites (values Remembered "Blocked")))) (if (not (all Sites (forEach (sites Mover) if:(is In (site) (sites (values Remembered "Playable")))) if:(>= 1 (count at:(site))))) (< 1 (count at:(from))))})) (then (sow "TrackCW" apply:(if (= 4 (count at:(to))) (and (if (!= 0 (count at:(trackSite Move from:(to) "TrackCW" steps:1))) (and (moveAgain) (set Var "Replay" (trackSite Move from:(to) "TrackCW" steps:1)))) (if (not (is In (to) (sites (values Remembered "Blocked")))) (fromTo (from (to)) (to (mapEntry Mover)) count:4))) (if (< 1 (count at:(to))) (and (moveAgain) (set Var "Replay" (to))))) skipIf:(or (not (is In (to) (sites (values Remembered "Playable")))) (and (= 3 (count at:(to))) (!= 1 (value))))))) (then (if (no Moves Next) (and {(forEach Site (sites P1) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry P1)) count:(count at:(site))))) (forEach Site (sites P2) (if (is Occupied (site)) (fromTo (from (site)) (to (mapEntry P2)) count:(count at:(site))))) (forget Value "Playable" All) (forget Value "Blocked" All) (if (< (+ (count at:(mapEntry P1)) (count in:(sites P1))) (+ (count at:(mapEntry P2)) (count in:(sites P2)))) (and (set NextPlayer (player 2)) (set Var "Winner" 2)) (and (set NextPlayer (player 1)) (set Var "Winner" 1)))}))))) (end (if (no Moves Next) {(if (> 2 (count at:(mapEntry P1))) (result P2 Win)) (if (> 2 (count at:(mapEntry P2))) (result P1 Win))})) (nextPhase (no Moves Next) "BetweenRounds")) (phase "BetweenRounds" (play (if (and (not (is Prev Mover)) (!= (mover) (var "Winner"))) (or (move (from (mapEntry Mover)) (to (if (is Mover P1) (intersection (sites Bottom) (expand (sites Right))) (intersection (sites Top) (expand (sites Left)))) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (if (> 4 (count at:(last To))) (and (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (mapEntry Next)) count:(- 4 (count at:(last To)))) (remember Value "Blocked" (last To)))) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending)) (set Var "Direction" 2)}))) (move (from (mapEntry Mover)) (to (if (is Mover P1) (intersection (sites Bottom) (expand (sites Left))) (intersection (sites Top) (expand (sites Right)))) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (if (> 4 (count at:(last To))) (and (fromTo (from (if (is Mover P1) (+ (to) 7) (- (to) 7))) (to (mapEntry Next)) count:(- 4 (count at:(last To)))) (remember Value "Blocked" (last To)))) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending)) (set Var "Direction" 1)})))) (if (!= (mover) (var "Winner")) (move (from (mapEntry Mover)) (to (if (= (var "Direction") 1) (trackSite Move from:(last To) "TrackCCW" steps:1) (trackSite Move from:(last To) "TrackCW" steps:1)) if:(is Empty (to))) count:(min 4 (count at:(mapEntry Mover))) (then (and {(remember Value "Playable" (last To)) (moveAgain) (if (= 0 (count at:(mapEntry Mover))) (set Pending))}))) (move (from (mapEntry Mover)) (to (sites Mover) if:(is Empty (to))) count:4 (then (and (remember Value "Playable" (last To)) (if (not (all Sites (sites Mover) if:(is Occupied (site)))) (moveAgain)))))))) (nextPhase (and (!= (var "Winner") (mover)) (= 0 (count at:(mapEntry Mover)))) "Sowing"))})) |