(define "LevelBetweenGroundAndDestinationPlusOne" (<= (- (size Stack at:(to)) (topLevel at:(from)) ) 1 ) ) (define "EmptyOrNeutralPiece" (= (who at:(to)) 0)) //------------------------------------------------------------------------- (game "Santorini" (players 2) (equipment { (board (square 5)) (hand Each) // Map between level and each piece to build the building. (map {(pair 0 "SquareLarge0") (pair 1 "SquareSmall0") (pair 2 "Octagon0") (pair 3 "Marker0")}) (piece "Pawn3d" Each (move Step (to if:(and ("LevelBetweenGroundAndDestinationPlusOne") ("EmptyOrNeutralPiece") ) ) (then (moveAgain)) ) ) (piece "SquareLarge" Neutral) (piece "SquareSmall" Neutral) (piece "Octagon" Neutral) (piece "Marker" Neutral) }) (rules (start { (place Stack "Pawn3d1" (handSite P1) count:2) (place Stack "Pawn3d2" (handSite P2) count:2) }) phases:{ (phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)) (then (if ("HandOccupied" Mover) (moveAgain) ) ) ) ) (nextPhase Mover ("HandEmpty" Mover) "Movement") ) (phase "Movement" (play (if ("SameTurn") (move Select (from (sites Around (last To) if:(and (< (size Stack at:(to)) 4) ("EmptyOrNeutralPiece") ) ) ) (then (add (piece (mapEntry (size Stack at:(last To)))) (to (last To)) stack:True ) ) ) (forEach Piece) ) ) ) } (end { (if (and (= 3 (topLevel at:(last To))) ("IsPieceAt" "Pawn3d" Mover (last To) level:(topLevel at:(last To))) ) (result Mover Win) ) (if (no Moves P1) (result P2 Win)) (if (no Moves P2) (result P1 Win)) }) ) ) //------------------------------------------------------------------------- (metadata (info { (description "Santorini is an accessible strategy game, simple enough for an elementary school classroom while aiming to provide gameplay depth and content for hardcore gamers to explore.") (aliases {"산토리니"}) (rules "The game is played on a 5x5 grid where each turn players build a town by placing building pieces up to four levels high. To win the game, players must move one of their two workers to the third level of the town. Beginning turns : The first player places his two workers on the board, then the second does the same. Normal turns : Each turn, the current player moves one of his two workers in an adjacent position (in horizontal, vertical or diagonal, i.e. king chess move) then he places a building tile adjacent to the moved worker (in a horizontal, vertical or diagonal adjacent position). The level of a position (i.e. a grid square) is the number of tiles. Workers can move onto a position with zero, one, two, or three tiles (but not with four tiles) only if the level of the destination position is less than or equal to the level of departure destination plus one. There can be no more than 4 tiles per position. The primary winning condition is to get one of his workers onto the third level (i.e. on a position with three tiles), though players may also win if their opponent is unable to make a move.") (id "639") (source "BGG") (version "1.3.12") (classification "board/race/reach") (author "Gordon Hamilton") (publisher "Roxley") (credit "Eric Piette") (date "2004") } ) (graphics { (piece Scale "SquareLarge" 1.0) (piece Scale "SquareSmall" 0.85) (piece Scale "Octagon" 0.7) (piece Scale "Marker" 0.55) (piece Scale "Pawn3d" container:0 0.6) (piece Colour "Marker" fillColour:(colour DarkBlue)) (stackType None) } ) (ai "Santorini_ai" ) )