(define "CaptureToPiece"
(apply
(if (is Occupied (to))
(remove (to))
)
)
)
(define "EmptySitesInHome"
(forEach
(sites Mover "Home")
if:(is Empty (site))
)
)
(define "CubeInHand"
(sites Occupied by:Mover container:(mover))
)
(define "GoalReached"
(all Sites
(sites Mover "Goal")
if:(is In (site) (sites Occupied by:Mover))
)
)
(define "MoveForwards"
(move Step
Forwards
(to
if:True
"CaptureToPiece"
)
)
)
(define "SameValue"
(= (state at:(from)) (count Pips))
)
(define "ValueNextHigher"
(if ("IsNotOffBoard" (where "Square" Mover state:(+ (count Pips) 1)))
(= (state at:(from)) (+ (count Pips) 1))
(if ("IsNotOffBoard" (where "Square" Mover state:(+ (count Pips) 2)))
(= (state at:(from)) (+ (count Pips) 2))
(if ("IsNotOffBoard" (where "Square" Mover state:(+ (count Pips) 3)))
(= (state at:(from)) (+ (count Pips) 3))
(if ("IsNotOffBoard" (where "Square" Mover state:(+ (count Pips) 4)))
(= (state at:(from)) (+ (count Pips) 4))
(= (state at:(from)) (+ (count Pips) 5))
)
)
)
)
)
(define "ValueNextLower"
(if ("IsNotOffBoard" (where "Square" Mover state:(- (count Pips) 1)))
(= (state at:(from)) (- (count Pips) 1))
(if ("IsNotOffBoard" (where "Square" Mover state:(- (count Pips) 2)))
(= (state at:(from)) (- (count Pips) 2))
(if ("IsNotOffBoard" (where "Square" Mover state:(- (count Pips) 3)))
(= (state at:(from)) (- (count Pips) 3))
(if ("IsNotOffBoard" (where "Square" Mover state:(- (count Pips) 4)))
(= (state at:(from)) (- (count Pips) 4))
(= (state at:(from)) (- (count Pips) 5))
)
)
)
)
)
(define "MoveAPieceOf"
(forEach Piece
(if
#1
("MoveForwards")
)
)
)
(define "PieceIsOnTheBoard"
("IsNotOffBoard" (where "Square" Mover state:(count Pips)))
)
//------------------------------------------------------------------------------
(game "EinStein Wurfelt Nicht"
(players {(player SE) (player NW)})
(equipment {
(board (square ))
(piece "Square" Each)
(hand Each size:)
(dice num:)
(regions "Home" P1 (expand (intersection (sites Top) (sites Left)) steps: Orthogonal))
(regions "Home" P2 (expand (intersection (sites Bottom) (sites Right)) steps: Orthogonal))
(regions "Goal" P1 (intersection (sites Bottom) (sites Right)))
(regions "Goal" P2 (intersection (sites Top) (sites Left)))
})
(rules
(start {
})
phases:{
(phase "Placement"
(play
(move
(from ("CubeInHand"))
(to ("EmptySitesInHome"))
)
)
(nextPhase Mover ("HandEmpty" Mover) "Movement")
)
(phase "Movement"
(play
("RollMove"
(if ("PieceIsOnTheBoard")
("MoveAPieceOf" ("SameValue"))
(or
("MoveAPieceOf" ("ValueNextHigher"))
("MoveAPieceOf" ("ValueNextLower"))
)
)
)
)
)
}
(end
(if
(or
(no Pieces Next)
("GoalReached")
)
(result Mover Win)
)
)
)
)
//------------------------------------------------------------------------------
(option "Board Size" args:{ }
{
(item "5"
<5>
<6>
<1>
<2>
<
(place "Square1" (handSite P1) state:1)
(place "Square1" (handSite P1 1) state:2)
(place "Square1" (handSite P1 2) state:3)
(place "Square1" (handSite P1 3) state:4)
(place "Square1" (handSite P1 4) state:5)
(place "Square1" (handSite P1 5) state:6)
(place "Square2" (handSite P2) state:1)
(place "Square2" (handSite P2 1) state:2)
(place "Square2" (handSite P2 2) state:3)
(place "Square2" (handSite P2 3) state:4)
(place "Square2" (handSite P2 4) state:5)
(place "Square2" (handSite P2 5) state:6)
>
"The version of the game played on 5x5 board."
)*
(item "6"
<6>
<10>
<2>
<3>
<
(place "Square1" (handSite P1) state:2)
(place "Square1" (handSite P1 1) state:3)
(place "Square1" (handSite P1 2) state:4)
(place "Square1" (handSite P1 3) state:5)
(place "Square1" (handSite P1 4) state:6)
(place "Square1" (handSite P1 5) state:8)
(place "Square1" (handSite P1 6) state:9)
(place "Square1" (handSite P1 7) state:10)
(place "Square1" (handSite P1 8) state:11)
(place "Square1" (handSite P1 9) state:12)
(place "Square2" (handSite P2) state:2)
(place "Square2" (handSite P2 1) state:3)
(place "Square2" (handSite P2 2) state:4)
(place "Square2" (handSite P2 3) state:5)
(place "Square2" (handSite P2 4) state:6)
(place "Square2" (handSite P2 5) state:8)
(place "Square2" (handSite P2 6) state:9)
(place "Square2" (handSite P2 7) state:10)
(place "Square2" (handSite P2 8) state:11)
(place "Square2" (handSite P2 9) state:12)
>
"The version of the game played on 6x6 board."
)
})
//------------------------------------------------------------------------------
(metadata
(info
{
(description "EinStein Würfelt Nicht! (Einstein does not play dice) is a board game, designed by Ingo Althöfer, a professor of applied mathematics in Jena, Germany. It was the official game of an exhibition about Einstein in Germany during the Einstein Year (2005).
The name of the game in German has a double meaning. It is a play on Einstein's famous quote \"I am convinced that He (God) does not play dice\" and also refers to the fact that when a player has only one cube (ein Stein) remaining, they no longer need to \"play dice\", and may simply move the cube.")
(aliases {"EinStein Würfelt Nicht"})
(rules "The game is played on a square board with a 5×5 grid. Each player has six cubes, numbered one to six. During setup, each player can arrange the cubes as he or she sees fit within the triangular area of their own color.
The players take turns rolling a six-sided die and then moving the matching cube. If the matching cube is no longer on the board, the player moves a remaining cube whose number is next-higher or next-lower to the rolled number. The player starting in the top-left may move that cube one square to the right, down, or on the diagonal down and to the right; the player starting in the bottom-right may move that cube one square to the left, up, or on the diagonal up and to the left. Any cube which already lies in the target square is removed from the board.
The objective of the game is for a player to either get one of their cubes to the far corner square in the grid (where their opponent started) or to remove all of their opponent's cubes from the board.")
(source "Wikipedia")
(id "472")
(version "1.3.7")
(classification "board/race/reach")
(author "Ingo Althöfer")
(publisher "3-Hirn-Verlag")
(credit "Eric Piette")
(date "2004")
}
)
(graphics {
(region Colour "Home" Edge)
(player Colour P1 (colour Red))
(player Colour P2 (colour Blue))
(show Piece State Middle)
(show RegionOwner)
})
(ai
"EinStein Wurfelt Nicht_ai"
)
)