(game "Pentomino"
(players <Players:numPlayers>)
(equipment {
(board (rectangle <Rows:num> <Columns:num>))
(tile "Z" Shared {F R F F L F})
(tile "Y" Shared {F R F R R F R F F})
(tile "X" Shared {F L F L L F F L L F R F})
(tile "W" Shared {F L F R F L F})
(tile "V" Shared {F F R F F})
(tile "U" Shared {F L F F L F})
(tile "T" Shared {F F R F R R F F})
(tile "P" Shared {F F R F R F})
(tile "N" Shared {F R F L F F})
(tile "L" Shared {F R F F F})
(tile "I" Shared {F F F F})
(tile "F" Shared {F L F L L F L F R F})
(hand Shared size:12)
})
(rules
(start {
(place "F" (handSite Shared 0))
(place "I" (handSite Shared 1))
(place "L" (handSite Shared 2))
(place "N" (handSite Shared 3))
(place "P" (handSite Shared 4))
(place "T" (handSite Shared 5))
(place "U" (handSite Shared 6))
(place "V" (handSite Shared 7))
(place "W" (handSite Shared 8))
(place "X" (handSite Shared 9))
(place "Y" (handSite Shared 10))
(place "Z" (handSite Shared 11))
})
(play (move (from (sites Hand Shared)) (to (sites Empty))))
(end ("NoMoves" <End:result>))
)
)
//------------------------------------------------------------------------------
(option "Players" <Players> args:{ <numPlayers> }
{
(item "2" <2> "The game is played by 2 players")*
(item "3" <3> "The game is played by 3 players")
}
)
(option "Rows" <Rows> args:{ <num> }
{
(item "1" <1> "The board has 1 row.")
(item "2" <2> "The board has 2 rows.")
(item "3" <3> "The board has 3 rows.")
(item "4" <4> "The board has 4 rows.")
(item "5" <5> "The board has 5 rows.")
(item "6" <6> "The board has 6 rows.")*
(item "7" <7> "The board has 7 rows.")
(item "8" <8> "The board has 8 rows.")
(item "9" <9> "The board has 9 rows.")
(item "10" <10> "The board has 10 rows.")
(item "11" <11> "The board has 11 rows.")
(item "12" <12> "The board has 12 rows.")
(item "13" <13> "The board has 13 rows.")
(item "14" <14> "The board has 14 rows.")
(item "15" <15> "The board has 15 rows.")
(item "16" <16> "The board has 16 rows.")
(item "17" <17> "The board has 17 rows.")
(item "18" <18> "The board has 18 rows.")
(item "19" <19> "The board has 19 rows.")
}
)
(option "Columns" <Columns> args:{ <num> }
{
(item "2" <2> "The board has 2 columns.")
(item "3" <3> "The board has 3 columns.")
(item "4" <4> "The board has 4 columns.")
(item "5" <5> "The board has 5 columns.")
(item "6" <6> "The board has 6 columns.")
(item "7" <7> "The board has 7 columns.")
(item "8" <8> "The board has 8 columns.")
(item "9" <9> "The board has 9 columns.")
(item "10" <10> "The board has 10 columns.")*
(item "11" <11> "The board has 11 columns.")
(item "12" <11> "The board has 12 columns.")
(item "13" <11> "The board has 13 columns.")
(item "14" <14> "The board has 14 columns.")
(item "15" <14> "The board has 15 columns.")
(item "16" <14> "The board has 16 columns.")
(item "17" <14> "The board has 17 columns.")
(item "18" <14> "The board has 18 columns.")
(item "19" <19> "The board has 19 columns.")
}
)
(option "End" <End> args:{ <result> }
{
(item "Normal" <Loss> "The Last player to play wins.")*
(item "Misere" <Win> "The Last player to play loses.")
}
)
//------------------------------------------------------------------------------
(metadata
(info
{
(description "Pentomino tiling puzzles and games are popular in recreational mathematics.")
(aliases {"Golomb's Game"})
(rules "Two players have a collection of dominoes which they place on the grid in turn, covering up squares. One player places tiles vertically, while the other places them horizontally. The first player who cannot move loses.")
(id "1664")
(source "<a href=\"https://en.wikipedia.org/wiki/Pentomino\" target=\"_blank\" class=\"style1\" style=\"color: #0000EE\" />Wikipedia</a>")
(version "1.3.10")
(classification "board/space/blocking")
(credit "Fabio Barbero")
}
)
(graphics {
(piece Colour "F" fillColour:(colour 221 187 153))
(piece Colour "I" fillColour:(colour 238 170 170))
(piece Colour "L" fillColour:(colour 204 204 136))
(piece Colour "N" fillColour:(colour 170 238 170))
(piece Colour "P" fillColour:(colour 187 221 153))
(piece Colour "T" fillColour:(colour 153 221 187))
(piece Colour "U" fillColour:(colour 136 204 204))
(piece Colour "V" fillColour:(colour 153 187 221))
(piece Colour "W" fillColour:(colour 170 170 238))
(piece Colour "X" fillColour:(colour 187 153 221))
(piece Colour "Y" fillColour:(colour 204 136 204))
(piece Colour "Z" fillColour:(colour 221 153 187))
})
(ai
"Pentomino_ai"
)
)
(game "Fanorona Telo"
(players 2)
(equipment {
("AlquerqueBoard" 3 3)
(hand Each)
(piece "Marker" Each "StepToEmpty")
})
(rules
(start (place "Marker" "Hand" count:3))
phases:{
(phase "Placement"
(play (move (from (handSite Mover)) (to (sites Empty))))
(nextPhase ("HandEmpty" P2) "Movement")
)
("PhaseMovePiece" "Movement")
}
(end ("Line3Win"))
)
)
//------------------------------------------------------------------------------
(metadata
(info
{
(description "Fanorona Telo is a simple game of alignment played by children of the Merina people of Madagascar.")
(rules "3x3 intersecting lines with diagonals. Play occurs on the intersections of the lines. Each player has three pieces. Play begins with each player placing pieces on empty points. If they make three in a row along the lines, they win. Once all pieces are placed, players take turns moving pieces one spot to an adjacent point along the lines trying to make three in a row.
")
(source "Murray 1951: 42.")
(id "951")
(version "1.3.10")
(classification "board/space/line")
(credit "Eric Piette")
(origin "This game was played in Madagascar, around 1951.")
}
)
(ai
"Fanorona Telo_ai"
)
)
(define "CaptureAgainIn"
(move Select
(from #1)
(to
(sites Around #1)
if:(and {
(not (is Visited (to)))
(is Empty (to))
("IsEnemyAt" (ahead #2 #3))
})
)
)
)
(define "EmptyButNotVisitedWithEnemyIn"
(and {
(not (is Visited (to)))
(is Empty (to))
("IsEnemyAt" (ahead #1 #2))
})
)
(define "EmptyWithEnemyIn"
(and
(is Empty (to))
("IsEnemyAt" (ahead #1 #2))
)
)
(define "RemoveEnemyPiece"
(to
if:("IsEnemyAt" (to))
(apply (remove (to)))
)
)
(define "MoveThePiece"
(fromTo
(from (last From))
(to (last To))
)
)
(define "MoveAgainIn"
(move Select
(from #1)
(to
(sites Around #1)
if:("EmptyButNotVisitedWithEnemyIn" #2 #3)
)
(then
(and {
"MoveThePiece"
(directional
(from #4)
#5
"RemoveEnemyPiece"
)
(if
(can Move
(or
("CaptureAgainIn" #1 (to) SameDirection)
("CaptureAgainIn" #1 (from) OppositeDirection)
)
)
(moveAgain)
)
})
)
)
)
(define "CaptureFromLast"
(or
("MoveAgainIn" #1 (to) SameDirection (last To) ("LastDirection" Vertex))
("MoveAgainIn" #1 (from) OppositeDirection (last From) (directions Vertex from:(last To) to:(last From)))
)
)
(define "MoveIn"
(forEach Piece
(move Select
(from)
(to
(sites Around (from))
if:("EmptyWithEnemyIn" #1 #2)
)
(then
(and
"MoveThePiece"
(directional
(from #3)
#4
"RemoveEnemyPiece"
)
)
)
)
(then
(if
(can Move ("CaptureFromLast" (last To)))
(moveAgain)
)
)
)
)
//------------------------------------------------------------------------------
(game "Fanorona"
(players 2)
(equipment {
("AlquerqueBoard" <Board:size>)
(piece "Marker" Each)
})
(rules
(start {
(place "Marker1" (union { <Board:startP1>}))
(place "Marker2" (union { <Board:startP2>}))
})
(play
(if "SameTurn"
(or
(if (is Occupied (last To))
("CaptureFromLast" (last To))
("CaptureFromLast" (last From))
)
(move Pass)
)
(priority {
(or
("MoveIn" (to) SameDirection (last To) ("LastDirection" Vertex))
("MoveIn" (from) OppositeDirection (last From) (directions Vertex from:(last To) to:(last From)))
)
(forEach Piece "StepToEmpty")
})
)
)
(end (if (no Pieces Mover) (result Next Win)))
)
)
//------------------------------------------------------------------------------
(option "Version" <Board> args:{ <size> <startP1> <startP2> }
{
(item "Telo" <3 3> <(union (sites Bottom) (sites {"C2"}))> <(union (sites {"A2"}) (sites Top))> "The game is played on a 3x3 board")
(item "Dimy" <5 5> <(union (expand (sites Bottom)) (sites {"A3" "D3"}))> <(union (sites {"B3" "E3"}) (expand (sites Top)))> "The game is played on a 5x5 board")
(item "Tsivy" <5 9> <(union (expand (sites Bottom)) (sites {"B3" "D3" "G3" "I3"}))> <(union (sites {"A3" "C3" "F3" "H3"}) (expand (sites Top)))> "The game is played on a 5x9 board")**
})
//------------------------------------------------------------------------------
(metadata
(info
{
(description "Fanorona is perhaps the most popular game in Madagascar. It has been documented there since the nineteenth century, but it plays a part in many Malagasy stories about their past so it likely has a much longer history there. It is often played outside, and most households in Madagascar have a Fanorona board in them.")
(rules "Fanorona-Tsivy is played on a board of 9x5 intersecting lines with diagonals. Each player has 22 pieces, starting on the intersections of the lines except in the centre position, placed on opposite rows of the board, but alternating in the central row.. Pieces move to an adjacent intersection along the lines. Players must capture pieces when possible. Capturing is accomplished by moving to an adjacent intersection to an opposing piece in the continuing direction of the capturing stones movement, or by moving away from an adjacent opposing pieces in such a direction. When an opponent's piece is captured, all other of the opponent's pieces in that line are also captured. Multiple captures can be made, but cannot be done by moving twice in the same direction. Multiple captures are optional. A player wins by capturing all of the other player's pieces.")
(source "Montgomery 1896: 151–155.")
(id "50")
(version "1.3.10")
(classification "board/war/direction/linear")
(credit "Eric Piette")
(origin "This game was played in Madagascar, around 1896.")
}
)
(ai
"Fanorona_ai"
)
)
(define "CaptureAgain"
(then
(if (can Move
("HopCapture"
(from (last To))
(difference Orthogonal OppositeDirection)
)
)
(moveAgain)
)
)
)
//------------------------------------------------------------------------------
(game "Bagh Bandi"
(players 2)
(equipment {
("AlquerqueBoardWithBottomAndTopTriangles")
(piece "Goat" P2 "StepToEmpty")
(piece "Tiger" P1
(or
("StepToEmpty")
("HopCapture"
~
~
("CaptureAgain")
)
)
)
(regions "CentralSites" (sites {6 8 16 18}))
(hand P1)
})
(rules
(start {
(place Stack "Tiger1" (handSite P1) count:2)
(place Stack "Goat2" 6 count:8)
(place Stack "Goat2" 8 count:8)
(place Stack "Goat2" 16 count:8)
(place Stack "Goat2" 18 count:8)
})
phases:{
(phase "Placement" P1
(play
(move
(from (handSite P1))
(to (sites Empty))
(then (if ("HandOccupied" Mover) (moveAgain)))
)
)
(nextPhase Mover ("HandEmpty" Mover) "Movement")
)
(phase "Movement"
(play
(if ("SameTurn")
(or
("HopCapture"
(from (last To))
(difference Orthogonal OppositeDirection)
("CaptureAgain")
)
(move Pass)
)
(forEach Piece top:True)
)
)
)
}
(end ("NoMovesP1NoPiecesP2"))
)
)
//------------------------------------------------------------------------------
(metadata
(info
{
(description "Bagh Bandi is a hunt game played in the Lower Bengal region of South Asia. In it, two tigers attempt to capture 32 goats, and the goats attempt to trap the tigers.")
(rules "5x5 intersecting lines, with diagonals drawn in the four quadrants of the board. Two triangles, their apices intersecting the main board at opposite midpoints. The bast of the triangle is bisected by a line drawn from the apex, and this line is bisected and intersects with the other two sides of the triangle. One player plays as two tigers, which can be placed anywhere on the board, and the other player plays as 32 goats, which begin on the four central points of the quadrants of the square board, eight per stack. Players alternate turns moving a piece to an empty adjacent spot along the lines. The goats move one at a time from their stacks, and cannot be restacked once they have been moved. The tiger may capture a goat by hopping over it to an empty spot immediately on the opposite side of an adjacent goat. Multiple captures in one turn are allowed, but a tiger cannot hop over a stack of goats and hop over it again in the opposite direction. When tigers hop over a stack of goats, only one goat is captured. The goats win by blocking the tigers from being able to move; the tigers win by capturing all the goats.")
(source "Datta 1933: 407-408.")
(id "898")
(version "1.3.10")
(classification "board/hunt")
(credit "Eric Piette")
(origin "This game was played in South Asia, around 1935.")
}
)
(graphics {
(stackType 0 Count)
(stackType 1 Count)
(piece Families {"Abstract" "Themed"})
(show Edges Diagonal Hidden)
(show Symbol "disc" "CentralSites" Vertex edgeColour:(colour Black) scale:0.5)
})
)
(define "Move" (move (from) (to (sites LineOfSight Farthest at:(from)))))
//-------------------------------------------------------------------------
(game "King's Valley"
(players 2)
(equipment {
(board (square 5))
(piece "Disc" Each "Move")
(piece "King" Each "Move")
})
(rules
(start {
(place "King1" (intersection (sites Bottom) (sites Column 2)))
(place "King2" (intersection (sites Top) (sites Column 2)))
(place "Disc1" (difference (sites Bottom) (sites Column 2)))
(place "Disc2" (difference (sites Top) (sites Column 2)))
})
(play (forEach Piece))
(end (if (is In (where "King" Mover) (sites Centre)) (result Mover Win)))
)
)
//-------------------------------------------------------------------------
(metadata
(info
{
(description "The game is played on a 5x5 board with the center square representing the King's Valley. Players start with 5 pieces on opposites sites of the board, with the center pieces being the kings.")
(rules "King's Valley is a very simple and easy game to play. This is because all the pieces move the same. Any piece can move straight horizontal, vertical or diagonal, but always as far as possible. Pieces always stop their movement either at the sides of the board or before another piece in the same row, column, or diagonal.
The winner is the first player that manages to move his king piece to the central square of the board, which represents the King's Valley.")
(id "1160")
(source "<a href=\"https://boardgamegeek.com/boardgame/86169/kings-valley\" target=\"_blank\" class=\"style1\" style=\"color: #0000EE\" />BGG</a>")
(version "1.3.10")
(classification "board/race/reach")
(author "Mitsuo Yamamoto")
(publisher "<a href=\"http://www.logygames.com/english/index.html\" target=\"_blank\" class=\"style1\" style=\"color: #0000EE\" />Logy Games</a> (used with permission)")
(credit "Eric Piette")
(date "2006")
}
)
(graphics {
(board Style Chess)
(board Colour Phase0 (colour White))
(board Colour Phase1 (colour VeryLightBlue))
(board Colour OuterEdges (colour Yellow))
(show Symbol "sun" (sites Centre) fillColour:(colour Yellow))
})
(ai
"King's Valley_ai"
)
)
(define "AdjacentNotEmptySites"
(sites Around
(to)
if:(not (is In (to) (sites Empty)))
)
)
//------------------------------------------------------------------------------
(game "Blue Nile"
(players 2)
(equipment {
(board (hex 5))
(piece "Marker" Neutral)
})
(rules
phases:{
(phase "start" P1
(play (move Add (piece (id "Marker0")) (to (sites Empty))))
(nextPhase "play")
)
(phase "play"
(play
(move Add
(piece "Marker0")
(to
(sites Around
(last To)
if:(and
(is Empty (to))
// not adjacent to any other piece except the last one placed.
("NoSites" (difference ("AdjacentNotEmptySites") (last To)))
)
)
)
)
)
)
}
(end ("NoMoves" Loss))
)
)
//------------------------------------------------------------------------------
(metadata
(info
{
(description "Invented by William Daniel Troyka in 2002, Blue Nile is a modern game played on a hexagonal board.")
(rules "Played on a hexagonal board with five spaces per side. Players take turns placing stones on an empty space. The stone must be adjacent to the last stone played but cannot be adjacent to any other. The last player to be able to make a legal move wins.")
(source "<a href=\"https://boardgamegeek.com/boardgame/33046/blue-nile\" target=\"_blank\" class=\"style1\" style=\"color: #0000EE\" />BGG</a>")
(id "381")
(version "1.3.10")
(classification "board/space/blocking")
(author "Dan Troyka")
(credit "Eric Piette")
(date "2002")
}
)
(ai
"Blue Nile_ai"
)
)