(game "Andarraya"
)
//------------------------------------------------------------------------------
(option "Variant" args:{ }
{
(item "Andarraya (Ludii 1)" <
(players 2)
(equipment {
(board
(square 8)
)
(piece "Pawn" Each
(or {
(move Step Forward
(to if:
(is Empty
(to)
)
)
)
(move Step
(directions { FR FL }
)
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
)
)
)
)
(or
(if
(is In
(from)
(sites Start
(piece
(what at:
(from)
)
)
)
)
(move Slide Forward
(between
(exact 2)
if:
(is Empty
(between)
)
)
(to if:
(is Empty
(to)
)
)
(then
(set Pending
(ahead
(last To)
Backward)
)
)
)
)
(move Step
(directions { FR FL }
)
(to if:
(and
(is Pending)
(=
(to)
(value Pending)
)
)
)
(then
(remove
(ahead
(last To)
Backward)
)
)
)
)
}
(then
(and
(if
(is In
(last To)
(sites Mover "Promotion")
)
(moveAgain)
)
(set Counter)
)
)
)
)
(piece "Rook" Each
(move Slide Orthogonal
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
(then
(set Counter)
)
)
)
)
(then
(if
(=
(state at:
(last To)
)
1)
(set State at:
(last To)
0)
)
)
)
)
(piece "King" Each
(move Step
(to if:
(not
(is Friend
(who at:
(to)
)
)
)
(apply
(if
(is Enemy
(who at:
(to)
)
)
(remove
(to)
(then
(set Counter)
)
)
)
)
)
(then
(if
(=
(state at:
(last To)
)
1)
(set State at:
(last To)
0)
)
)
)
)
(piece "Bishop" Each
(move Slide Diagonal
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
(then
(set Counter)
)
)
)
)
)
)
(piece "Knight" Each
(move Leap { { F F R F }
{ F F L F }
}
(to if:
(not
(is Friend
(who at:
(to)
)
)
)
(apply
(if
(is Enemy
(who at:
(to)
)
)
(remove
(to)
(then
(set Counter)
)
)
)
)
)
)
)
(piece "Queen" Each
(move Slide
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
(then
(set Counter)
)
)
)
)
)
)
(map "King" {
(pair 1 "E1")
(pair 2 "E8")
}
)
(map "RookLeft" {
(pair 1 "A1")
(pair 2 "A8")
}
)
(map "RookRight" {
(pair 1 "H1")
(pair 2 "H8")
}
)
(regions "Promotion" P1
(sites Top)
)
(regions "Promotion" P2
(sites Bottom)
)
}
)
(rules
(start {
(place "Pawn1"
(sites Row 1)
)
(place "Pawn2"
(sites Row 6)
)
(place "Rook1" { "A1" "H1"}
state:1)
(place "Knight1" { "B1" "G1"}
)
(place "Bishop1" { "C1" "F1"}
)
(place "Queen1" coord:"D1")
(place "King1" coord:"E1" state:1)
(place "Rook2" { "A8" "H8"}
state:1)
(place "Knight2" { "B8" "G8"}
)
(place "Bishop2" { "C8" "F8"}
)
(place "Queen2" coord:"D8")
(place "King2" coord:"E8" state:1)
}
)
(play
(if
(is Prev Mover)
(move Promote
(last To)
(piece { "Queen" "Knight" "Bishop" "Rook"}
)
Mover )
(do
(or
(forEach Piece)
(if
(and
(=
(state at:
(mapEntry "King"
(mover)
)
)
1)
(not
(is Threatened
(id "King" Mover)
)
)
)
(or
(if
(and
(=
(state at:
(mapEntry "RookLeft"
(mover)
)
)
1 )
(can Move
(slide
(from
(mapEntry "RookLeft"
(mover)
)
)
E
(between
(exact 3)
if:
(is Empty
(to)
)
)
(to if:True
(apply
(set State at:
(from)
0 )
)
)
)
)
)
(move Slide
(from
(mapEntry "King"
(mover)
)
)
W
(between
(exact 2)
if:
(and
(is Empty
(to)
)
(not
(is Threatened
(id "King" Mover)
at:
(to)
)
)
)
)
(to if:True
(apply
(set State at:
(from)
0)
)
)
(then
(slide
(from
(mapEntry "RookLeft"
(mover)
)
)
E
(between
(exact 3)
if:True)
(to if:True
(apply
(set State at:
(from)
0 )
)
)
)
)
)
)
(if
(and
(=
(state at:
(mapEntry "RookRight"
(mover)
)
)
1 )
(can Move
(slide
(from
(mapEntry "RookRight"
(mover)
)
)
W
(between
(exact 2)
if:
(is Empty
(to)
)
)
(to if:True
(apply
(set State at:
(from)
0 )
)
)
)
)
)
(move Slide
(from
(mapEntry "King"
(mover)
)
)
E
(between
(exact 2)
if:
(and
(is Empty
(to)
)
(not
(is Threatened
(id "King" Mover)
at:
(to)
)
)
)
)
(to if:True
(apply
(set State at:
(from)
0)
)
)
(then
(slide
(from
(mapEntry "RookRight"
(mover)
)
)
W
(between
(exact 2)
if:True)
(to if:True
(apply
(set State at:
(from)
0 )
)
)
)
)
)
)
)
)
)
ifAfterwards:
(not
(is Threatened
(id "King" Mover)
)
)
)
)
)
(end {
(if
(and
(is Threatened
(id "King" Next)
)
(not
(can Move
(do
(forEach Piece Next)
ifAfterwards:
(not
(is Threatened
(id "King" Next)
)
)
)
)
)
)
(result Mover Win)
)
(if
(or
(no Moves Mover)
(=
(counter)
99)
)
(result Mover Draw)
)
}
)
)
> "The Andarraya (Ludii 1) ruleset.")
(item "Andarraya (Ludii 2)" <
(players 2)
(equipment {
(board
(square 8)
)
(piece "Pawn" Each
(or {
(move Step Forward
(to if:
(is Empty
(to)
)
)
)
(move Step
(directions { FR FL }
)
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
)
)
)
)
(or
(if
(is In
(from)
(sites Start
(piece
(what at:
(from)
)
)
)
)
(move Slide Forward
(between
(exact 2)
if:
(is Empty
(between)
)
)
(to if:
(is Empty
(to)
)
)
(then
(set Pending
(ahead
(last To)
Backward)
)
)
)
)
(move Step
(directions { FR FL }
)
(to if:
(and
(is Pending)
(=
(to)
(value Pending)
)
)
)
(then
(remove
(ahead
(last To)
Backward)
)
)
)
)
}
(then
(and
(if
(is In
(last To)
(sites Mover "Promotion")
)
(moveAgain)
)
(set Counter)
)
)
)
)
(piece "Rook" Each
(move Slide Orthogonal
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
(then
(set Counter)
)
)
)
)
(then
(if
(=
(state at:
(last To)
)
1)
(set State at:
(last To)
0)
)
)
)
)
(piece "King" Each
(move Step
(to if:
(not
(is Friend
(who at:
(to)
)
)
)
(apply
(if
(is Enemy
(who at:
(to)
)
)
(remove
(to)
(then
(set Counter)
)
)
)
)
)
(then
(if
(=
(state at:
(last To)
)
1)
(set State at:
(last To)
0)
)
)
)
)
(piece "Bishop" Each
(move Slide Diagonal
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
(then
(set Counter)
)
)
)
)
)
)
(piece "Knight" Each
(move Leap { { F F R F }
{ F F L F }
}
(to if:
(not
(is Friend
(who at:
(to)
)
)
)
(apply
(if
(is Enemy
(who at:
(to)
)
)
(remove
(to)
(then
(set Counter)
)
)
)
)
)
)
)
(piece "Queen" Each
(move Slide
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
(then
(set Counter)
)
)
)
)
)
)
(map "King" {
(pair 1 "E1")
(pair 2 "E8")
}
)
(map "RookLeft" {
(pair 1 "A1")
(pair 2 "A8")
}
)
(map "RookRight" {
(pair 1 "H1")
(pair 2 "H8")
}
)
(regions "Promotion" P1
(sites Top)
)
(regions "Promotion" P2
(sites Bottom)
)
}
)
(rules
(start {
(place "Pawn1"
(sites Row 1)
)
(place "Pawn2"
(sites Row 6)
)
(place "Rook1" { "A1" "H1"}
state:1)
(place "Knight1" { "B1" "G1"}
)
(place "Bishop1" { "C1" "F1"}
)
(place "Queen1" coord:"D1")
(place "King1" coord:"E1" state:1)
(place "Rook2" { "A8" "H8"}
state:1)
(place "Knight2" { "B8" "G8"}
)
(place "Bishop2" { "C8" "F8"}
)
(place "Queen2" coord:"D8")
(place "King2" coord:"E8" state:1)
}
)
(play
(do
(or
(forEach Piece)
(if
(and
(=
(state at:
(mapEntry "King"
(mover)
)
)
1)
(not
(is Threatened
(id "King" Mover)
)
)
)
(or
(if
(and
(=
(state at:
(mapEntry "RookLeft"
(mover)
)
)
1 )
(can Move
(slide
(from
(mapEntry "RookLeft"
(mover)
)
)
E
(between
(exact 3)
if:
(is Empty
(to)
)
)
(to if:True
(apply
(set State at:
(from)
0)
)
)
)
)
)
(move Slide
(from
(mapEntry "King"
(mover)
)
)
W
(between
(exact 2)
if:
(and
(is Empty
(to)
)
(not
(is Threatened
(id "King" Mover)
at:
(to)
)
)
)
)
(to if:True
(apply
(set State at:
(from)
0)
)
)
(then
(slide
(from
(mapEntry "RookLeft"
(mover)
)
)
E
(between
(exact 3)
if:True)
(to if:True
(apply
(set State at:
(from)
0)
)
)
)
)
)
)
(if
(and
(=
(state at:
(mapEntry "RookRight"
(mover)
)
)
1 )
(can Move
(slide
(from
(mapEntry "RookRight"
(mover)
)
)
W
(between
(exact 2)
if:
(is Empty
(to)
)
)
(to if:True
(apply
(set State at:
(from)
0)
)
)
)
)
)
(move Slide
(from
(mapEntry "King"
(mover)
)
)
E
(between
(exact 2)
if:
(and
(is Empty
(to)
)
(not
(is Threatened
(id "King" Mover)
at:
(to)
)
)
)
)
(to if:True
(apply
(set State at:
(from)
0)
)
)
(then
(slide
(from
(mapEntry "RookRight"
(mover)
)
)
W
(between
(exact 2)
if:True)
(to if:True
(apply
(set State at:
(from)
0)
)
)
)
)
)
)
)
)
)
ifAfterwards:
(not
(is Threatened
(id "King" Mover)
)
)
)
)
(end {
(if
(and
(is Threatened
(id "King" Next)
)
(not
(can Move
(do
(forEach Piece Next)
ifAfterwards:
(not
(is Threatened
(id "King" Next)
)
)
)
)
)
)
(result Mover Win)
)
(if
(= 1
(count Pieces Next)
)
(result Mover Win)
)
(if
(no Moves Next)
(result Mover Win)
)
}
)
)
> "The Andarraya (Ludii 2) ruleset.")
(item "Andarraya (Ludii 3)" <
(players 2)
(equipment {
(board
(square 8)
)
(piece "Pawn" Each
(or {
(move Step Forward
(to if:
(is Empty
(to)
)
)
)
(move Step
(directions { FR FL }
)
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
)
)
)
)
(or
(if
(is In
(from)
(sites Start
(piece
(what at:
(from)
)
)
)
)
(move Slide Forward
(between
(exact 2)
if:
(is Empty
(between)
)
)
(to if:
(is Empty
(to)
)
)
(then
(set Pending
(ahead
(last To)
Backward)
)
)
)
)
(move Step
(directions { FR FL }
)
(to if:
(and
(is Pending)
(=
(to)
(value Pending)
)
)
)
(then
(remove
(ahead
(last To)
Backward)
)
)
)
)
}
(then
(if
(and
(=
(where "Queen" Mover)
Off)
(is In
(last To)
(sites Mover "Promotion")
)
)
(promote
(last To)
(piece { "Queen"}
)
Mover)
)
)
)
)
(piece "Rook" Each
(move Slide Orthogonal
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
)
)
)
(then
(if
(=
(state at:
(last To)
)
1)
(set State at:
(last To)
0)
)
)
)
)
(piece "King" Each
(or
(if
(and
(not
(is Threatened
(id "King" Mover)
)
)
(=
(state at:
(mapEntry "King"
(mover)
)
)
1)
)
(move Slide
(between
(exact 2)
)
(to if:
(is Empty
(to)
)
)
)
)
(move Step
(to if:
(not
(is Friend
(who at:
(to)
)
)
)
(apply
(remove
(to)
)
)
)
)
(then
(if
(=
(state at:
(last To)
)
1)
(set State at:
(last To)
0)
)
)
)
)
(piece "Bishop" Each
(move Slide Diagonal
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
)
)
)
)
)
(piece "Knight" Each
(move Leap { { F F R F }
{ F F L F }
}
(to if:
(not
(is Friend
(who at:
(to)
)
)
)
(apply
(if
(is Enemy
(who at:
(to)
)
)
(remove
(to)
)
)
)
)
)
)
(piece "Queen" Each
(move Slide
(to if:
(and
(not
(=
(what at:
(to)
)
(id "Queen" Next)
)
)
(is Enemy
(who at:
(to)
)
)
)
(apply
(if
(is Enemy
(who at:
(to)
)
)
(remove
(to)
)
)
)
)
)
)
(map "King" {
(pair 1 "E1")
(pair 2 "E8")
}
)
(map "RookLeft" {
(pair 1 "A1")
(pair 2 "A8")
}
)
(map "RookRight" {
(pair 1 "H1")
(pair 2 "H8")
}
)
(regions "Promotion" P1
(sites Top)
)
(regions "Promotion" P2
(sites Bottom)
)
}
)
(rules
(start {
(place "Pawn1"
(sites Row 1)
)
(place "Pawn2"
(sites Row 6)
)
(place "Rook1" { "A1" "H1"}
state:1)
(place "Knight1" { "B1" "G1"}
)
(place "Bishop1" { "C1" "F1"}
)
(place "Queen1" coord:"D1")
(place "King1" coord:"E1" state:1)
(place "Rook2" { "A8" "H8"}
state:1)
(place "Knight2" { "B8" "G8"}
)
(place "Bishop2" { "C8" "F8"}
)
(place "Queen2" coord:"D8")
(place "King2" coord:"E8" state:1)
}
)
(play
(if
(is Prev Mover)
(move Promote
(last To)
(piece { "Queen" "Knight" "Bishop" "Rook"}
)
Mover )
(do
(or
(forEach Piece)
(if
(and
(=
(state at:
(mapEntry "King"
(mover)
)
)
1)
(not
(is Threatened
(id "King" Mover)
)
)
)
(or
(if
(and
(=
(state at:
(mapEntry "RookLeft"
(mover)
)
)
1 )
(can Move
(slide
(from
(mapEntry "RookLeft"
(mover)
)
)
E
(between
(exact 3)
if:
(is Empty
(to)
)
)
(to if:True
(apply
(set State at:
(from)
0 )
)
)
)
)
)
(move Slide
(from
(mapEntry "King"
(mover)
)
)
W
(between
(exact 2)
if:
(and
(is Empty
(to)
)
(not
(is Threatened
(id "King" Mover)
at:
(to)
)
)
)
)
(to if:True
(apply
(set State at:
(from)
0)
)
)
(then
(slide
(from
(mapEntry "RookLeft"
(mover)
)
)
E
(between
(exact 3)
if:True)
(to if:True
(apply
(set State at:
(from)
0 )
)
)
)
)
)
)
(if
(and
(=
(state at:
(mapEntry "RookRight"
(mover)
)
)
1 )
(can Move
(slide
(from
(mapEntry "RookRight"
(mover)
)
)
W
(between
(exact 2)
if:
(is Empty
(to)
)
)
(to if:True
(apply
(set State at:
(from)
0 )
)
)
)
)
)
(move Slide
(from
(mapEntry "King"
(mover)
)
)
E
(between
(exact 2)
if:
(and
(is Empty
(to)
)
(not
(is Threatened
(id "King" Mover)
at:
(to)
)
)
)
)
(to if:True
(apply
(set State at:
(from)
0)
)
)
(then
(slide
(from
(mapEntry "RookRight"
(mover)
)
)
W
(between
(exact 2)
if:True)
(to if:True
(apply
(set State at:
(from)
0 )
)
)
)
)
)
)
)
)
)
ifAfterwards:
(not
(is Threatened
(id "King" Mover)
)
)
)
)
)
(end {
(if
(and
(is Threatened
(id "King" Next)
)
(not
(can Move
(do
(forEach Piece Next)
ifAfterwards:
(not
(is Threatened
(id "King" Next)
)
)
)
)
)
)
(result Mover Win)
)
(if
(or
(no Moves Mover)
(=
(counter)
99)
)
(result Mover Draw)
)
}
)
)
> "The Andarraya (Ludii 3) ruleset.")
(item "Andarraya (Ludii 4)" <
(players 2)
(equipment {
(board
(square 8)
)
(piece "Counter" P1 N)
(piece "Counter" P2 S)
(piece "DoubleCounter" Each)
(regions P1
(sites Bottom)
)
(regions P2
(sites Top)
)
}
)
(rules
(start {
(place "Counter1"
(difference
(expand
(sites Bottom)
steps:
(- 3 1)
)
(sites Phase 1)
)
)
(place "Counter2"
(difference
(expand
(sites Top)
steps:
(- 3 1)
)
(sites Phase 1)
)
)
}
)
(play
(if
(is Prev Mover)
(if
(=
(what at:
(last To)
)
(id "Counter" Mover)
)
(max Moves
(move Hop
(from
(last To)
)
(directions { FR FL }
)
(between if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
(then
(if
(is In
(last To)
(sites Next)
)
(and
(promote
(last To)
(piece "DoubleCounter")
Mover )
(if
(can Move
(move Hop
(from
(last To)
)
Diagonal
(between before:
(count Rows)
after:
(count Rows)
if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
)
)
(moveAgain)
)
)
(if
(can Move
(move Hop
(from
(last To)
)
(directions { FR FL }
)
(between if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
)
)
(moveAgain)
)
)
)
)
)
(max Moves
(move Hop
(from
(last To)
)
Diagonal
(between before:
(count Rows)
after:
(count Rows)
if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
(then
(if
(can Move
(move Hop
(from
(last To)
)
Diagonal
(between before:
(count Rows)
after:
(count Rows)
if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
)
)
(moveAgain)
)
)
)
)
)
(do
(set Pending
(sites From
(max Moves
(or
(forEach Piece "Counter"
(move Hop
(from)
(directions { FR FL }
)
(between if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
(then
(if
(is In
(last To)
(sites Next)
)
(and
(promote
(last To)
(piece "DoubleCounter" )
Mover )
(if
(can Move
(move Hop
(from
(last To )
)
Diagonal
(between before:
(count Rows )
after:
(count Rows )
if:
(is Enemy
(who at:
(between )
)
)
(apply
(remove
(between )
)
)
)
(to if:
(is Empty
(to )
)
)
)
)
(moveAgain)
)
)
(if
(can Move
(move Hop
(from
(last To)
)
(directions { FR FL }
)
(between if:
(is Enemy
(who at:
(between )
)
)
(apply
(remove
(between )
)
)
)
(to if:
(is Empty
(to)
)
)
)
)
(moveAgain)
)
)
)
)
)
(forEach Piece "DoubleCounter"
(move Hop
(from)
Diagonal
(between before:
(count Rows)
after:
(count Rows)
if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
(then
(if
(can Move
(move Hop
(from
(last To)
)
Diagonal
(between before:
(count Rows )
after:
(count Rows )
if:
(is Enemy
(who at:
(between )
)
)
(apply
(remove
(between )
)
)
)
(to if:
(is Empty
(to)
)
)
)
)
(moveAgain)
)
)
)
)
)
)
)
)
next:
(or {
(forEach Piece "Counter"
(max Moves
(move Hop
(from)
(directions { FR FL }
)
(between if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
(then
(and
(set Value Mover
(last To)
)
(if
(is In
(last To)
(sites Next)
)
(and
(promote
(last To)
(piece "DoubleCounter" )
Mover )
(if
(can Move
(move Hop
(from
(last To )
)
Diagonal
(between before:
(count Rows )
after:
(count Rows )
if:
(is Enemy
(who at:
(between )
)
)
(apply
(remove
(between )
)
)
)
(to if:
(is Empty
(to )
)
)
)
)
(moveAgain)
)
)
(if
(can Move
(move Hop
(from
(last To)
)
(directions { FR FL }
)
(between if:
(is Enemy
(who at:
(between )
)
)
(apply
(remove
(between )
)
)
)
(to if:
(is Empty
(to)
)
)
)
)
(moveAgain)
)
)
)
)
)
)
)
(forEach Piece "DoubleCounter"
(max Moves
(move Hop
(from)
Diagonal
(between before:
(count Rows)
after:
(count Rows)
if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
(then
(and
(set Value Mover
(last To)
)
(if
(can Move
(move Hop
(from
(last To)
)
Diagonal
(between before:
(count Rows )
after:
(count Rows )
if:
(is Enemy
(who at:
(between )
)
)
(apply
(remove
(between )
)
)
)
(to if:
(is Empty
(to)
)
)
)
)
(moveAgain)
)
)
)
)
)
)
(forEach Piece "Counter"
(move Step
(directions { FR FL }
)
(to if:
(is Empty
(to)
)
)
(then
(if
(is In
(last To)
(sites Next)
)
(promote
(last To)
(piece "DoubleCounter")
Mover )
)
)
)
)
(forEach Piece "DoubleCounter"
(move Slide Diagonal)
)
}
)
(then
(and
(if
(and
(!=
(value Player Mover)
(last To)
)
(not
(is In
(last To)
(sites Pending)
)
)
)
(remove
(sites Pending)
)
)
(if
(and
(!=
(value Player Mover)
(last To)
)
(is In
(last From)
(sites Pending)
)
)
(remove
(last To)
)
)
)
)
)
)
)
(end
(forEach Player if:
(no Moves Player)
(result Player Loss)
)
)
)
> "The Andarraya (Ludii 4) ruleset.")
(item "Andarraya (Ludii 5)" <
(players 2)
(equipment {
(board
(square 8)
)
(piece "Pawn" Each
(or {
(move Step Forward
(to if:
(is Empty
(to)
)
)
)
(move Step
(directions { FR FL }
)
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
)
)
)
)
(or
(if
(is In
(from)
(sites Start
(piece
(what at:
(from)
)
)
)
)
(move Slide Forward
(between
(exact 2)
if:
(is Empty
(between)
)
)
(to if:
(is Empty
(to)
)
)
(then
(set Pending
(ahead
(last To)
Backward)
)
)
)
)
(move Step
(directions { FR FL }
)
(to if:
(and
(is Pending)
(=
(to)
(value Pending)
)
)
)
(then
(remove
(ahead
(last To)
Backward)
)
)
)
)
}
(then
(if
(and
(=
(where "Queen" Mover)
Off)
(is In
(last To)
(sites Mover "Promotion")
)
)
(promote
(last To)
(piece { "Queen"}
)
Mover)
)
)
)
)
(piece "Rook" Each
(move Slide Orthogonal
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
)
)
)
(then
(if
(=
(state at:
(last To)
)
1)
(set State at:
(last To)
0)
)
)
)
)
(piece "King" Each
(or
(if
(and
(not
(is Threatened
(id "King" Mover)
)
)
(=
(state at:
(mapEntry "King"
(mover)
)
)
1)
)
(move Slide
(between
(exact 2)
)
(to if:
(is Empty
(to)
)
)
)
)
(move Step
(to if:
(not
(is Friend
(who at:
(to)
)
)
)
(apply
(remove
(to)
)
)
)
)
(then
(if
(=
(state at:
(last To)
)
1)
(set State at:
(last To)
0)
)
)
)
)
(piece "Bishop" Each
(move Slide Diagonal
(to if:
(is Enemy
(who at:
(to)
)
)
(apply
(remove
(to)
)
)
)
)
)
(piece "Knight" Each
(move Leap { { F F R F }
{ F F L F }
}
(to if:
(not
(is Friend
(who at:
(to)
)
)
)
(apply
(if
(is Enemy
(who at:
(to)
)
)
(remove
(to)
)
)
)
)
)
)
(piece "Queen" Each
(move Slide
(to if:
(and
(not
(=
(what at:
(to)
)
(id "Queen" Next)
)
)
(is Enemy
(who at:
(to)
)
)
)
(apply
(if
(is Enemy
(who at:
(to)
)
)
(remove
(to)
)
)
)
)
)
)
(map "King" {
(pair 1 "E1")
(pair 2 "E8")
}
)
(map "RookLeft" {
(pair 1 "A1")
(pair 2 "A8")
}
)
(map "RookRight" {
(pair 1 "H1")
(pair 2 "H8")
}
)
(regions "Promotion" P1
(sites Top)
)
(regions "Promotion" P2
(sites Bottom)
)
}
)
(rules
(start {
(place "Pawn1"
(sites Row 1)
)
(place "Pawn2"
(sites Row 6)
)
(place "Rook1" { "A1" "H1"}
state:1)
(place "Knight1" { "B1" "G1"}
)
(place "Bishop1" { "C1" "F1"}
)
(place "Queen1" coord:"D1")
(place "King1" coord:"E1" state:1)
(place "Rook2" { "A8" "H8"}
state:1)
(place "Knight2" { "B8" "G8"}
)
(place "Bishop2" { "C8" "F8"}
)
(place "Queen2" coord:"D8")
(place "King2" coord:"E8" state:1)
}
)
(play
(do
(or
(forEach Piece)
(if
(and
(=
(state at:
(mapEntry "King"
(mover)
)
)
1)
(not
(is Threatened
(id "King" Mover)
)
)
)
(or
(if
(and
(=
(state at:
(mapEntry "RookLeft"
(mover)
)
)
1 )
(can Move
(slide
(from
(mapEntry "RookLeft"
(mover)
)
)
E
(between
(exact 3)
if:
(is Empty
(to)
)
)
(to if:True
(apply
(set State at:
(from)
0)
)
)
)
)
)
(move Slide
(from
(mapEntry "King"
(mover)
)
)
W
(between
(exact 2)
if:
(and
(is Empty
(to)
)
(not
(is Threatened
(id "King" Mover)
at:
(to)
)
)
)
)
(to if:True
(apply
(set State at:
(from)
0)
)
)
(then
(slide
(from
(mapEntry "RookLeft"
(mover)
)
)
E
(between
(exact 3)
if:True)
(to if:True
(apply
(set State at:
(from)
0)
)
)
)
)
)
)
(if
(and
(=
(state at:
(mapEntry "RookRight"
(mover)
)
)
1 )
(can Move
(slide
(from
(mapEntry "RookRight"
(mover)
)
)
W
(between
(exact 2)
if:
(is Empty
(to)
)
)
(to if:True
(apply
(set State at:
(from)
0)
)
)
)
)
)
(move Slide
(from
(mapEntry "King"
(mover)
)
)
E
(between
(exact 2)
if:
(and
(is Empty
(to)
)
(not
(is Threatened
(id "King" Mover)
at:
(to)
)
)
)
)
(to if:True
(apply
(set State at:
(from)
0)
)
)
(then
(slide
(from
(mapEntry "RookRight"
(mover)
)
)
W
(between
(exact 2)
if:True)
(to if:True
(apply
(set State at:
(from)
0)
)
)
)
)
)
)
)
)
)
ifAfterwards:
(not
(is Threatened
(id "King" Mover)
)
)
)
)
(end {
(if
(and
(is Threatened
(id "King" Next)
)
(not
(can Move
(do
(forEach Piece Next)
ifAfterwards:
(not
(is Threatened
(id "King" Next)
)
)
)
)
)
)
(result Mover Win)
)
(if
(= 1
(count Pieces Next)
)
(result Mover Win)
)
(if
(no Moves Next)
(result Mover Win)
)
}
)
)
> "The Andarraya (Ludii 5) ruleset.")
(item "Andarraya (Ludii 6)" <
(players 2)
(equipment {
(board
(merge
(shift 0
(/
(- 7 3)
2)
(rectangle 3 7 diagonals:Alternating)
)
(shift
(/
(- 7 3)
2)
0
(rectangle 7 3 diagonals:Alternating)
)
)
use:Vertex )
(piece "Marker" P1
(or
(move Hop
(between if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
)
(move Step
(to if:
(is Empty
(to)
)
)
)
)
)
(piece "Marker" P2
(move Step
(to if:
(is Empty
(to)
)
)
)
)
}
)
(rules
(start {
(place "Marker1"
(sites { "C6" "E6"}
)
)
(place "Marker2"
(union
(expand
(union
(sites Right)
(sites Left)
)
)
(expand
(sites Bottom)
steps:3)
)
)
}
)
(play
(if
(is Mover P1)
(do
(forEach Site
(sites From
(forEach Piece "Marker"
(move Hop
(between if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
)
)
)
(remember Value "From"
(site)
)
)
next:
(forEach Piece)
(then
(and
(if
(!= 0
(count Sites in:
(sites
(values Remembered "From")
)
)
)
(if
(= 1
(count Steps
(last From)
(last To)
)
)
(and
(forEach Site
(sites
(values Remembered "From")
)
(remove
(site)
)
)
(if
(is In
(last From)
(sites
(values Remembered "From")
)
)
(remove
(last To)
)
)
)
)
)
(forget Value All)
)
)
)
(forEach Piece)
)
)
(end {
(if
(no Pieces P2)
(result P1 Win)
)
(if
(or
(or
(no Pieces P1)
(no Moves P1)
)
(all Sites
(expand
(sites Top)
steps:2)
if:
(=
(who at:
(site)
)
P2)
)
)
(result P2 Win)
)
}
)
)
> "The Andarraya (Ludii 6) ruleset.")
(item "Andarraya (Ludii 7)" <
(players 2)
(equipment {
(board
(square 5)
use:Vertex)
(piece "Disc" Each
(or
(move Hop
(directions { Rightward Leftward Forwards }
of:All)
(between if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
(then
(and
(if
(is In
(last To)
(sites Next)
)
(promote
(last To)
(piece "DiscDouble")
Mover )
)
(set Value Mover 0)
)
)
)
(move Step
(directions { Rightward Leftward Forwards }
of:All)
(to if:
(is Empty
(to)
)
)
(then
(set Value Mover 1)
)
)
(then
(if
(is In
(last To)
(sites Next)
)
(promote
(last To)
(piece "DiscDouble")
Mover)
)
)
)
)
(piece "DiscDouble" Each
(or
(move Hop All
(between before:
(count Rows)
after:
(count Rows)
if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
(then
(set Value Mover 0)
)
)
(move Slide All
(then
(set Value Mover 1)
)
)
)
)
(regions P1
(intersection
(sites Corners)
(sites Bottom)
)
)
(regions P2
(intersection
(sites Corners)
(sites Top)
)
)
}
)
(rules
(start {
(place "Disc1"
(union {
(expand
(sites Bottom)
)
(sites { "D3" "E3"}
)
}
)
)
(place "Disc2"
(union {
(sites { "A3" "B3"}
)
(expand
(sites Top)
)
}
)
)
}
)
(play
(or
(if
(=
(value Player Prev)
1)
(or
(if
(and
(is In
(last From)
(sites Pending)
)
(is In
(last From)
(sites Empty)
)
)
(move Select
(from
(last To)
if:
(is Occupied
(from)
)
)
(then
(and {
(remove
(last To)
)
(moveAgain)
(set Value Prev 0)
}
)
)
)
)
(move Select
(from
(sites Pending)
if:
(is Occupied
(from)
)
)
(then
(and {
(remove
(last To)
)
(moveAgain)
(set Value Prev 0)
}
)
)
)
)
)
(do
(set Pending
(sites From
(or
(forEach Piece "Disc"
(move Hop
(directions { Rightward Leftward Forwards }
of:All )
(between if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
(then
(and
(if
(is In
(last To)
(sites Next)
)
(promote
(last To)
(piece "DiscDouble")
Mover )
)
(set Value Mover 0)
)
)
)
)
(forEach Piece "DiscDouble"
(move Hop All
(between before:
(count Rows)
after:
(count Rows)
if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
)
)
)
)
)
next:
(forEach Piece)
)
)
)
(end
(if
(no Pieces Mover)
(result Mover Loss)
)
)
)
> "The Andarraya (Ludii 7) ruleset.")
(item "Andarraya (Ludii 8)" <
(players 2)
(equipment {
(board
(merge
(shift 0
(/
(- 7 3)
2)
(rectangle 3 7 diagonals:Alternating)
)
(shift
(/
(- 7 3)
2)
0
(rectangle 7 3 diagonals:Alternating)
)
)
use:Vertex )
(piece "Fox" P1
(or
(move Hop
(between if:
(is Enemy
(who at:
(between)
)
)
(apply
(remove
(between)
)
)
)
(to if:
(is Empty
(to)
)
)
)
(move Step
(to if:
(is Empty
(to)
)
)
)
)
)
(piece "Hen" P2
(move Step
(directions { Rightward Leftward Forwards }
)
(to if:
(is Empty
(to)
)
)
)
)
}
)
(rules
(start {
(place "Hen2"
(union
(sites Top)
(expand
(sites Row 4)
)
)
)
(place "Fox1"
(intersection
(union
(sites Column 4)
(sites Column 2)
)
(sites Bottom)
)
)
}
)
(play
(forEach Piece)
)
(end {
(if
(all Sites
(expand
(sites Bottom)
steps:2)
if:
(=
(who at:
(site)
)
P2)
)
(result P2 Win)
)
(if
(no Pieces P2)
(result P1 Win)
)
}
)
)
> "The Andarraya (Ludii 8) ruleset.")
(item "Andarraya (Ludii 9)" <
(players 2)
(equipment {
(board
(merge {
(rectangle 1 6)
(shift 7 0
(rectangle 1 6)
)
(shift 0 6
(rectangle 1 6)
)
(shift 7 6
(rectangle 1 6)
)
}
)
{
(track "Track1" { 0 1 2 3 4 5 6 7 8 9 10 11 23 22 21 20 19 18 17 16 15 14 13 12 }
P1 directed:True )
(track "Track2" { 12 13 14 15 16 17 18 19 20 21 22 23 11 10 9 8 7 6 5 4 3 2 1 0 }
P2 directed:True )
}
use:Vertex )
(dice d:6 num:3)
(piece "Disc" Each
(forEach Die if:
(!=
(pips)
0)
(if
(=
(trackSite Move from:
(from)
steps:
(pips)
)
Off)
(move Remove
(from)
)
(move
(from
(from)
)
(to
(trackSite Move from:
(from)
steps:
(pips)
)
if:
(or
(not
(is Enemy
(who at:
(to)
)
)
)
(= 1
(size Stack at:
(to)
)
)
)
(apply
(if
(is Enemy
(who at:
(to)
)
)
(if
(=
(count Sites in:
(difference
(sites Next "StartQuadrant" )
(union
(sites {
(to)
}
)
(sites Occupied by:Mover )
)
)
)
0 )
(and
(remove
(to)
)
(trigger "StartQuadrantFull" Next )
)
(fromTo
(from
(to)
)
(to
(if
(and
(!=
(to)
(regionSite
(sites Next "StartQuadrant" )
index:0 )
)
(not
(is Friend
(who at:
(regionSite
(sites Next "StartQuadrant" )
index:0 )
)
)
)
)
(regionSite
(sites Next "StartQuadrant" )
index:0 )
(if
(and
(!=
(to)
(regionSite
(sites Next "StartQuadrant" )
index:1 )
)
(not
(is Friend
(who at:
(regionSite
(sites Next "StartQuadrant" )
index:1 )
)
)
)
)
(regionSite
(sites Next "StartQuadrant" )
index:1 )
(if
(and
(!=
(to)
(regionSite
(sites Next "StartQuadrant" )
index:2 )
)
(not
(is Friend
(who at:
(regionSite
(sites Next "StartQuadrant" )
index:2 )
)
)
)
)
(regionSite
(sites Next "StartQuadrant" )
index:2 )
(if
(and
(!=
(to )
(regionSite
(sites Next "StartQuadrant" )
index:3 )
)
(not
(is Friend
(who at:
(regionSite
(sites Next "StartQuadrant" )
index:3 )
)
)
)
)
(regionSite
(sites Next "StartQuadrant" )
index:3 )
(if
(and
(!=
(to )
(regionSite
(sites Next "StartQuadrant" )
index:4 )
)
(not
(is Friend
(who at:
(regionSite
(sites Next "StartQuadrant" )
index:4 )
)
)
)
)
(regionSite
(sites Next "StartQuadrant" )
index:4 )
(if
(and
(!=
(to )
(regionSite
(sites Next "StartQuadrant" )
index:5 )
)
(not
(is Friend
(who at:
(regionSite
(sites Next "StartQuadrant" )
index:5 )
)
)
)
)
(regionSite
(sites Next "StartQuadrant" )
index:5 )
(regionSite
(sites Next "StartQuadrant" )
index:6 )
)
)
)
)
)
)
)
)
)
)
)
)
)
)
(then
(if
(not
(all DiceUsed)
)
(moveAgain)
)
)
)
)
(regions "StartQuadrant" P1
(sites { 6 7 8 9 10 11}
)
)
(regions "StartQuadrant" P2
(sites { 18 19 20 21 22 23}
)
)
}
)
(rules
(start {
(place Stack "Disc1" 7 count:13)
(place Stack "Disc1" 11 count:2)
(place Stack "Disc2" 19 count:13)
(place Stack "Disc2" 23 count:2)
}
)
(play
(do
(if
(not
(is Prev Mover)
)
(roll)
)
next:
(forEach Piece)
)
)
(end {
(if
(no Pieces Mover)
(result Mover Win)
)
(if
(is Triggered "StartQuadrantFull" P1)
(result P2 Win)
)
(if
(is Triggered "StartQuadrantFull" P2)
(result P1 Win)
)
(if
(and
(not
(is Prev Mover)
)
(no Moves Mover)
)
(result Mover Loss)
)
}
)
)
> "The Andarraya (Ludii 9) ruleset.")
(item "Andarraya (Ludii 10)" <
(players 2)
(equipment {
(board
(merge {
(rectangle 1 6)
(shift 7 0
(rectangle 1 6)
)
(shift 0 6
(rectangle 1 6)
)
(shift 7 6
(rectangle 1 6)
)
}
)
{
(track "Track1" { 24 0 1 2 3 4 5 6 7 8 9 10 11 23 22 21 20 19 18 17 16 15 14 13 12 }
P1 directed:True )
(track "Track2" { 25 0 1 2 3 4 5 6 7 8 9 10 11 23 22 21 20 19 18 17 16 15 14 13 12 }
P2 directed:True )
}
use:Vertex )
(dice d:6 num:2)
(hand Each)
(piece "Disc" Each
(or
(forEach Die if:
(!=
(pips)
0)
(if
(=
(trackSite Move steps:
(pips)
)
Off)
(move Remove
(from)
)
(if
(or
(not
(is Enemy
(who at:
(trackSite Move steps:
(pips)
)
)
)
)
(= 1
(size Stack at:
(trackSite Move steps:
(pips)
)
)
)
)
(move
(from)
(to
(trackSite Move steps:
(pips)
)
(apply if:
(is Enemy
(who at:
(to)
)
)
(fromTo
(from
(to)
)
(to
(handSite
(who at:
(to)
)
)
)
)
)
)
)
)
)
)
(if
(=
(value Player Mover)
Undefined)
(or {
(if
(=
(trackSite Move steps:1)
Off)
(move Remove
(from)
)
(if
(or
(not
(is Enemy
(who at:
(trackSite Move steps:1 )
)
)
)
(= 1
(size Stack at:
(trackSite Move steps:1 )
)
)
)
(move
(from)
(to
(trackSite Move steps:1)
(apply if:
(is Enemy
(who at:
(to)
)
)
(fromTo
(from
(to)
)
(to
(handSite
(who at:
(to)
)
)
)
)
)
)
)
)
)
(if
(=
(trackSite Move steps:2)
Off)
(move Remove
(from)
)
(if
(or
(not
(is Enemy
(who at:
(trackSite Move steps:2 )
)
)
)
(= 1
(size Stack at:
(trackSite Move steps:2 )
)
)
)
(move
(from)
(to
(trackSite Move steps:2)
(apply if:
(is Enemy
(who at:
(to)
)
)
(fromTo
(from
(to)
)
(to
(handSite
(who at:
(to)
)
)
)
)
)
)
)
)
)
(if
(=
(trackSite Move steps:3)
Off)
(move Remove
(from)
)
(if
(or
(not
(is Enemy
(who at:
(trackSite Move steps:3 )
)
)
)
(= 1
(size Stack at:
(trackSite Move steps:3 )
)
)
)
(move
(from)
(to
(trackSite Move steps:3)
(apply if:
(is Enemy
(who at:
(to)
)
)
(fromTo
(from
(to)
)
(to
(handSite
(who at:
(to)
)
)
)
)
)
)
)
)
)
(if
(=
(trackSite Move steps:4)
Off)
(move Remove
(from)
)
(if
(or
(not
(is Enemy
(who at:
(trackSite Move steps:4 )
)
)
)
(= 1
(size Stack at:
(trackSite Move steps:4 )
)
)
)
(move
(from)
(to
(trackSite Move steps:4)
(apply if:
(is Enemy
(who at:
(to)
)
)
(fromTo
(from
(to)
)
(to
(handSite
(who at:
(to)
)
)
)
)
)
)
)
)
)
(if
(=
(trackSite Move steps:5)
Off)
(move Remove
(from)
)
(if
(or
(not
(is Enemy
(who at:
(trackSite Move steps:5 )
)
)
)
(= 1
(size Stack at:
(trackSite Move steps:5 )
)
)
)
(move
(from)
(to
(trackSite Move steps:5)
(apply if:
(is Enemy
(who at:
(to)
)
)
(fromTo
(from
(to)
)
(to
(handSite
(who at:
(to)
)
)
)
)
)
)
)
)
)
(if
(=
(trackSite Move steps:6)
Off)
(move Remove
(from)
)
(if
(or
(not
(is Enemy
(who at:
(trackSite Move steps:6 )
)
)
)
(= 1
(size Stack at:
(trackSite Move steps:6 )
)
)
)
(move
(from)
(to
(trackSite Move steps:6)
(apply if:
(is Enemy
(who at:
(to)
)
)
(fromTo
(from
(to)
)
(to
(handSite
(who at:
(to)
)
)
)
)
)
)
)
)
)
}
(then
(if
(not
(all DiceUsed)
)
(and
(moveAgain)
(set Value Mover 1)
)
)
)
)
)
)
)
}
)
(rules
(start {
(place Stack "Disc1" 6 count:5)
(place Stack "Disc1" 4 count:3)
(place Stack "Disc1" 12 count:5)
(place Stack "Disc1" 23 count:2)
(place Stack "Disc2" 18 count:5)
(place Stack "Disc2" 16 count:3)
(place Stack "Disc2" 0 count:5)
(place Stack "Disc2" 11 count:2)
}
)
(play
(do
(if
(not
(is Prev Mover)
)
(roll)
)
next:
(forEach Piece)
)
)
(end
(if
(no Pieces Mover)
(result Mover Win)
)
)
)
> "The Andarraya (Ludii 10) ruleset.")
(item "Incomplete"
<
(players 2)
(equipment [#])
(rules
[#]
)
>
"The incomplete ruleset."
)
})
//------------------------------------------------------------------------------
(rulesets {
(ruleset "Ruleset/Andarraya (Ludii 1) (Reconstructed)" {
"Variant/Andarraya (Ludii 1)"
})
(ruleset "Ruleset/Andarraya (Ludii 2) (Reconstructed)" {
"Variant/Andarraya (Ludii 2)"
})
(ruleset "Ruleset/Andarraya (Ludii 3) (Reconstructed)" {
"Variant/Andarraya (Ludii 3)"
})
(ruleset "Ruleset/Andarraya (Ludii 4) (Reconstructed)" {
"Variant/Andarraya (Ludii 4)"
})
(ruleset "Ruleset/Andarraya (Ludii 5) (Reconstructed)" {
"Variant/Andarraya (Ludii 5)"
})
(ruleset "Ruleset/Andarraya (Ludii 6) (Reconstructed)" {
"Variant/Andarraya (Ludii 6)"
})
(ruleset "Ruleset/Andarraya (Ludii 7) (Reconstructed)" {
"Variant/Andarraya (Ludii 7)"
})
(ruleset "Ruleset/Andarraya (Ludii 8) (Reconstructed)" {
"Variant/Andarraya (Ludii 8)"
})
(ruleset "Ruleset/Andarraya (Ludii 9) (Reconstructed)" {
"Variant/Andarraya (Ludii 9)"
})
(ruleset "Ruleset/Andarraya (Ludii 10) (Reconstructed)" {
"Variant/Andarraya (Ludii 10)"
})
(ruleset "Ruleset/Historical Information (Incomplete)" {
"Variant/Incomplete"
})
})
//------------------------------------------------------------------------------
(metadata
(info
{
(description "Andarraya is a capturing game played in fifteenth century Spain.")
(useFor "Ruleset/Historical Information (Incomplete)" (rules "Board game."))
(useFor "Ruleset/Historical Information (Incomplete)" (source "DLP evidence."))
(useFor "Ruleset/Historical Information (Incomplete)" (id "1473"))
(useFor "Ruleset/Andarraya (Ludii 1) (Reconstructed)" (rules "The game Andarraya is played by two players on a 8x8 rectangle board with square tiling.
Regions:
Promotion: the top sites of the board for P1
Promotion: the bottom sites of the board for P2
All players play with Pawns, Rooks, Kings, Bishops, Knights and Queens.
Rules for Pieces:
Bishops slide from the location of the piece in the diagonal direction through [between] is in the set of empty cells.
Kings if there is an enemy Player at to, remove pieces at to then set the current counter of the game to -1 then step adjacent then if State at the to location of the last move is equal to 1, set the state of the Cell the to location of the last move to 0.
Knights leap a piece to not is a friend.
Pawns step forward or remove pieces at to then step forward-right or forward-left or if the location of the piece is in start position, slide from the location of the piece in the forward direction through empty then set the site the Cell 1 steps ahead of the to location of the last move in the direction backward to pending or step forward-right or forward-left then remove pieces at the Cell 1 steps ahead of the to location of the last move in the direction backward if the to location of the last move is in Promotion or Promotion, move again and set the current counter of the game to -1.
Queens slide from the location of the piece in the adjacent direction through [between] is in the set of empty cells.
Rooks slide from the location of the piece in the orthogonal direction through [between] is in the set of empty cells then if State at the to location of the last move is equal to 1, set the state of the Cell the to location of the last move to 0.
Players take turns moving.
Setup:
Place a Pawn for player one at each cell of the 1 row.
Place a Pawn for player two at each cell of the 6 row.
Place a Rook for player one on sites: A1 and H1.
Place a Knight for player one on sites: B1 and G1.
Place a Bishop for player one on sites: C1 and F1.
Place a Queen for player one on site D1.
Place a King for player one on site E1.
Place a Rook for player two on sites: A8 and H8.
Place a Knight for player two on sites: B8 and G8.
Place a Bishop for player two on sites: C8 and F8.
Place a Queen for player two on site D8.
Place a King for player two on site E8..
Rules:
If in the same turn, a piece of the moving player the to location of the last move, this piece can promote into Queen, Knight, Bishop or Rook, else move one of your pieces or if State at King of current moving player is equal to 1 and not King of the moving player is threatened, if State at RookLeft of current moving player is equal to 1 and can move slide from RookLeft of current moving player in the east direction through empty, slide from King of current moving player in the west direction through empty and not King of the moving player is threatened then slide from RookLeft of current moving player in the east direction through true or if State at RookRight of current moving player is equal to 1 and can move slide from RookRight of current moving player in the west direction through empty, slide from King of current moving player in the east direction through empty and not King of the moving player is threatened then slide from RookRight of current moving player in the west direction through true.
Aim:
If King of the next player is threatened and not can move move one of your pieces, the moving player wins If the moving player cannot move or Counter is equal to 99, it's a draw.
"))
(useFor "Ruleset/Andarraya (Ludii 1) (Reconstructed)" (id "4056"))
(useFor "Ruleset/Andarraya (Ludii 2) (Reconstructed)" (rules "The game Andarraya is played by two players on a 8x8 rectangle board with square tiling.
Regions:
Promotion: the top sites of the board for P1
Promotion: the bottom sites of the board for P2
All players play with Pawns, Rooks, Kings, Bishops, Knights and Queens.
Rules for Pieces:
Bishops slide from the location of the piece in the diagonal direction through [between] is in the set of empty cells.
Kings if there is an enemy Player at to, remove pieces at to then set the current counter of the game to -1 then step adjacent then if State at the to location of the last move is equal to 1, set the state of the Cell the to location of the last move to 0.
Knights leap a piece to not is a friend.
Pawns step forward or remove pieces at to then step forward-right or forward-left or if the location of the piece is in start position, slide from the location of the piece in the forward direction through empty then set the site the Cell 1 steps ahead of the to location of the last move in the direction backward to pending or step forward-right or forward-left then remove pieces at the Cell 1 steps ahead of the to location of the last move in the direction backward if the to location of the last move is in Promotion or Promotion, move again and set the current counter of the game to -1.
Queens slide from the location of the piece in the adjacent direction through [between] is in the set of empty cells.
Rooks slide from the location of the piece in the orthogonal direction through [between] is in the set of empty cells then if State at the to location of the last move is equal to 1, set the state of the Cell the to location of the last move to 0.
Players take turns moving.
Setup:
Place a Pawn for player one at each cell of the 1 row.
Place a Pawn for player two at each cell of the 6 row.
Place a Rook for player one on sites: A1 and H1.
Place a Knight for player one on sites: B1 and G1.
Place a Bishop for player one on sites: C1 and F1.
Place a Queen for player one on site D1.
Place a King for player one on site E1.
Place a Rook for player two on sites: A8 and H8.
Place a Knight for player two on sites: B8 and G8.
Place a Bishop for player two on sites: C8 and F8.
Place a Queen for player two on site D8.
Place a King for player two on site E8..
Rules:
Move one of your pieces or if State at King of current moving player is equal to 1 and not King of the moving player is threatened, if State at RookLeft of current moving player is equal to 1 and can move slide from RookLeft of current moving player in the east direction through empty, slide from King of current moving player in the west direction through empty and not King of the moving player is threatened then slide from RookLeft of current moving player in the east direction through true or if State at RookRight of current moving player is equal to 1 and can move slide from RookRight of current moving player in the west direction through empty, slide from King of current moving player in the east direction through empty and not King of the moving player is threatened then slide from RookRight of current moving player in the west direction through true.
Aim:
If King of the next player is threatened and not can move move one of your pieces, the moving player wins If 1 is equal to the number of pieces owned by Player the next player, the moving player wins If the next player cannot move, the moving player wins.
"))
(useFor "Ruleset/Andarraya (Ludii 2) (Reconstructed)" (id "4057"))
(useFor "Ruleset/Andarraya (Ludii 3) (Reconstructed)" (rules "The game Andarraya is played by two players on a 8x8 rectangle board with square tiling.
Regions:
Promotion: the top sites of the board for P1
Promotion: the bottom sites of the board for P2
All players play with Pawns, Rooks, Kings, Bishops, Knights and Queens.
Rules for Pieces:
Bishops slide from the location of the piece in the diagonal direction through [between] is in the set of empty cells.
Kings if not King of the moving player is threatened and State at King of current moving player is equal to 1, slide from the location of the piece in the adjacent direction through [between] is in the set of empty cells or remove pieces at to then step adjacent if State at the to location of the last move is equal to 1, set the state of the Cell the to location of the last move to 0.
Knights leap a piece to not is a friend.
Pawns step forward or remove pieces at to then step forward-right or forward-left or if the location of the piece is in start position, slide from the location of the piece in the forward direction through empty then set the site the Cell 1 steps ahead of the to location of the last move in the direction backward to pending or step forward-right or forward-left then remove pieces at the Cell 1 steps ahead of the to location of the last move in the direction backward if Queen of the moving player is in is equal to -1 and the to location of the last move is in Promotion or Promotion, a piece of the moving player the to location of the last move, this piece can promote into Queen.
Queens slide from the location of the piece in the adjacent direction through [between] is in the set of empty cells.
Rooks slide from the location of the piece in the orthogonal direction through [between] is in the set of empty cells then if State at the to location of the last move is equal to 1, set the state of the Cell the to location of the last move to 0.
Players take turns moving.
Setup:
Place a Pawn for player one at each cell of the 1 row.
Place a Pawn for player two at each cell of the 6 row.
Place a Rook for player one on sites: A1 and H1.
Place a Knight for player one on sites: B1 and G1.
Place a Bishop for player one on sites: C1 and F1.
Place a Queen for player one on site D1.
Place a King for player one on site E1.
Place a Rook for player two on sites: A8 and H8.
Place a Knight for player two on sites: B8 and G8.
Place a Bishop for player two on sites: C8 and F8.
Place a Queen for player two on site D8.
Place a King for player two on site E8..
Rules:
If in the same turn, a piece of the moving player the to location of the last move, this piece can promote into Queen, Knight, Bishop or Rook, else move one of your pieces or if State at King of current moving player is equal to 1 and not King of the moving player is threatened, if State at RookLeft of current moving player is equal to 1 and can move slide from RookLeft of current moving player in the east direction through empty, slide from King of current moving player in the west direction through empty and not King of the moving player is threatened then slide from RookLeft of current moving player in the east direction through true or if State at RookRight of current moving player is equal to 1 and can move slide from RookRight of current moving player in the west direction through empty, slide from King of current moving player in the east direction through empty and not King of the moving player is threatened then slide from RookRight of current moving player in the west direction through true.
Aim:
If King of the next player is threatened and not can move move one of your pieces, the moving player wins If the moving player cannot move or Counter is equal to 99, it's a draw.
"))
(useFor "Ruleset/Andarraya (Ludii 3) (Reconstructed)" (id "4058"))
(useFor "Ruleset/Andarraya (Ludii 4) (Reconstructed)" (rules "The game Andarraya is played by two players on a 8x8 rectangle board with square tiling.
Regions:
RegionP1: the bottom sites of the board for P1
RegionP2: the top sites of the board for P2
All players play with Counters and DoubleCounters.
Players take turns moving.
Setup:
Place a Counter for player one at the difference between the bottom sites of the board expanded by 3 minus 1 steps and all sites within [1,3,5,7,8,10,12,14,17,19,21,23,24,26,28,30,33,35,37,39,40,42,44,46,49,51,53,55,56,58,60,62].
Place a Counter for player two at the difference between the top sites of the board expanded by 3 minus 1 steps and all sites within [1,3,5,7,8,10,12,14,17,19,21,23,24,26,28,30,33,35,37,39,40,42,44,46,49,51,53,55,56,58,60,62]..
Rules:
If in the same turn, if Piece at the to location of the last move is equal to Counter of the moving player, if false then perform any of the following moves which has the most sub-moves hop forward-right or forward-left then if the to location of the last move is in RegionP1 or RegionP2, a piece of the moving player the to location of the last move, this piece can promote into DoubleCounter and if can move hop diagonal, move again, else if can move hop forward-right or forward-left, move again, else if false then perform any of the following moves which has the most sub-moves hop diagonal then if can move hop diagonal, move again, else set the region the from sites of if false then perform any of the following moves which has the most sub-moves move one of your pieces or move one of your pieces to pending and afterwards move one of your pieces or move one of your pieces or move one of your pieces or move one of your pieces then if the value of Player the moving player is not equal to the to location of the last move and not the to location of the last move is in the pending sites, remove pieces at the pending sites and if the value of Player the moving player is not equal to the to location of the last move and the from location of the last move is in the pending sites, remove pieces at the to location of the last move.
"))
(useFor "Ruleset/Andarraya (Ludii 4) (Reconstructed)" (id "4059"))
(useFor "Ruleset/Andarraya (Ludii 5) (Reconstructed)" (rules "The game Andarraya is played by two players on a 8x8 rectangle board with square tiling.
Regions:
Promotion: the top sites of the board for P1
Promotion: the bottom sites of the board for P2
All players play with Pawns, Rooks, Kings, Bishops, Knights and Queens.
Rules for Pieces:
Bishops slide from the location of the piece in the diagonal direction through [between] is in the set of empty cells.
Kings if not King of the moving player is threatened and State at King of current moving player is equal to 1, slide from the location of the piece in the adjacent direction through [between] is in the set of empty cells or remove pieces at to then step adjacent if State at the to location of the last move is equal to 1, set the state of the Cell the to location of the last move to 0.
Knights leap a piece to not is a friend.
Pawns step forward or remove pieces at to then step forward-right or forward-left or if the location of the piece is in start position, slide from the location of the piece in the forward direction through empty then set the site the Cell 1 steps ahead of the to location of the last move in the direction backward to pending or step forward-right or forward-left then remove pieces at the Cell 1 steps ahead of the to location of the last move in the direction backward if Queen of the moving player is in is equal to -1 and the to location of the last move is in Promotion or Promotion, a piece of the moving player the to location of the last move, this piece can promote into Queen.
Queens slide from the location of the piece in the adjacent direction through [between] is in the set of empty cells.
Rooks slide from the location of the piece in the orthogonal direction through [between] is in the set of empty cells then if State at the to location of the last move is equal to 1, set the state of the Cell the to location of the last move to 0.
Players take turns moving.
Setup:
Place a Pawn for player one at each cell of the 1 row.
Place a Pawn for player two at each cell of the 6 row.
Place a Rook for player one on sites: A1 and H1.
Place a Knight for player one on sites: B1 and G1.
Place a Bishop for player one on sites: C1 and F1.
Place a Queen for player one on site D1.
Place a King for player one on site E1.
Place a Rook for player two on sites: A8 and H8.
Place a Knight for player two on sites: B8 and G8.
Place a Bishop for player two on sites: C8 and F8.
Place a Queen for player two on site D8.
Place a King for player two on site E8..
Rules:
Move one of your pieces or if State at King of current moving player is equal to 1 and not King of the moving player is threatened, if State at RookLeft of current moving player is equal to 1 and can move slide from RookLeft of current moving player in the east direction through empty, slide from King of current moving player in the west direction through empty and not King of the moving player is threatened then slide from RookLeft of current moving player in the east direction through true or if State at RookRight of current moving player is equal to 1 and can move slide from RookRight of current moving player in the west direction through empty, slide from King of current moving player in the east direction through empty and not King of the moving player is threatened then slide from RookRight of current moving player in the west direction through true.
Aim:
If King of the next player is threatened and not can move move one of your pieces, the moving player wins If 1 is equal to the number of pieces owned by Player the next player, the moving player wins If the next player cannot move, the moving player wins.
"))
(useFor "Ruleset/Andarraya (Ludii 5) (Reconstructed)" (id "4060"))
(useFor "Ruleset/Andarraya (Ludii 6) (Reconstructed)" (rules "The game Andarraya is played by two players on a noshape board with nobasis tiling.
All players play with Markers.
Rules for Pieces:
Markers step adjacent.
Players take turns moving.
Setup:
Place a Marker for player one at the vertexes with coordinates [C6, E6].
Place a Marker for player two at the union of the union of the right sites of the board and the left sites of the board expanded by 1 steps and the bottom sites of the board expanded by 3 steps..
Rules:
If 1 is the mover, Each turn, where the site is within the from sites of move one of your pieces, remember the value current site and afterwards move one of your pieces then if 0 is not equal to the number of sites in sites all remembered values, if 1 is equal to the number of Adjacent step moves from Vertex the from location of the last move to the to location of the last move, Each turn, where the site is within sites all remembered values, remove pieces at current site and if the from location of the last move is in sites all remembered values, remove pieces at the to location of the last move and forget all previously remembered values, else move one of your pieces.
Aim:
If there are no pieces owned by Player 2, player one wins If there are no pieces owned by Player 1 or player one cannot move or all sites in the top sites of the board expanded by 2 steps satisfy the condition Player at current site is equal to 2, player two wins.
"))
(useFor "Ruleset/Andarraya (Ludii 6) (Reconstructed)" (id "4061"))
(useFor "Ruleset/Andarraya (Ludii 7) (Reconstructed)" (rules "The game Andarraya is played by two players on a 5x5 rectangle board with square tiling.
Regions:
RegionP1: the intersection of the corner sites of the board and the bottom sites of the board for P1
RegionP2: the intersection of the corner sites of the board and the top sites of the board for P2
All players play with Discs and DiscDoubles.
Rules for Pieces:
Discs hop rightward, leftward or forwards then if the to location of the last move is in RegionP1 or RegionP2, a piece of the moving player the to location of the last move, this piece can promote into DiscDouble and set the value of Player the moving player to 0 or step rightward, leftward or forwards then set the value of Player the moving player to 1 if the to location of the last move is in RegionP1 or RegionP2, a piece of the moving player the to location of the last move, this piece can promote into DiscDouble.
DiscDoubles hop all then set the value of Player the moving player to 0 or slide from the location of the piece in the all direction through [between] is in the set of empty vertexs then set the value of Player the moving player to 1.
Players take turns moving.
Setup:
Place a Disc for player one at the union of the bottom sites of the board expanded by 1 steps and the vertexes with coordinates [D3, E3].
Place a Disc for player two at the union of the vertexes with coordinates [A3, B3] and the top sites of the board expanded by 1 steps..
Rules:
If the value of Player Prev is equal to 1, if the from location of the last move is in the pending sites and the from location of the last move is in the set of empty vertexs, select Vertex in the to location of the last move if vertex the location of the piece is occupied then remove pieces at the to location of the last move and move again and set the value of Player Prev to 0 or select Vertex in the pending sites if vertex the location of the piece is occupied then remove pieces at the to location of the last move and move again and set the value of Player Prev to 0 or set the region the from sites of move one of your pieces or move one of your pieces to pending and afterwards move one of your pieces.
Aim:
If there are no pieces owned by Player the moving player, the moving player loses.
"))
(useFor "Ruleset/Andarraya (Ludii 7) (Reconstructed)" (id "4062"))
(useFor "Ruleset/Andarraya (Ludii 8) (Reconstructed)" (rules "The game Andarraya is played by two players on a noshape board with nobasis tiling.
Player one plays with Foxes. Player two plays with Hens.
Rules for Pieces:
Foxes hop adjacent or step adjacent.
Hens step rightward, leftward or forwards.
Players take turns moving.
Setup:
Place a Hen for player two at the union of the top sites of the board and each vertex of the 4 row expanded by 1 steps.
Place a Fox for player one at the intersection of the union of each vertex of the 4 column and each vertex of the 2 column and the bottom sites of the board..
Rules:
Move one of your pieces.
Aim:
If all sites in the bottom sites of the board expanded by 2 steps satisfy the condition Player at current site is equal to 2, player two wins If there are no pieces owned by Player 2, player one wins.
"))
(useFor "Ruleset/Andarraya (Ludii 8) (Reconstructed)" (id "4063"))
(useFor "Ruleset/Andarraya (Ludii 9) (Reconstructed)" (rules "The game Andarraya is played by two players on a noshape board with nobasis tiling.
Regions:
StartQuadrant: sites [6,7,8,9,10,11] for P1
StartQuadrant: sites [18,19,20,21,22,23] for P2
All players play with Discs. The following pieces are shared by all players: Dies with 6 faces valued [1, 2, 3, 4, 5, 6], Dies with 6 faces valued [1, 2, 3, 4, 5, 6] and Dies with 6 faces valued [1, 2, 3, 4, 5, 6].
Rules for Pieces:
Discs according to the value of the dice, if the number of pips on the dice steps forward from site the location of the piece on track null is equal to -1, remove pieces at the location of the piece, else from vertex in the location of the piece to vertex the number of pips on the dice steps forward from site the location of the piece on track null moveRule: not there is an enemy Player at to or 1 is equal to the size of the stack on vertex to captureEffect: if there is an enemy Player at to, if the number of sites in the difference between StartQuadrant or StartQuadrant and the union of sites [to] and sites occupied by any component owned by Mover is equal to 0, remove pieces at to and trigger StartQuadrantFull for Player the next player, else from vertex in to to vertex if to is not equal to site 0 of region StartQuadrant or StartQuadrant and not is a friend then site 0 of region StartQuadrant or StartQuadrant otherwise if to is not equal to site 1 of region StartQuadrant or StartQuadrant and not is a friend then site 1 of region StartQuadrant or StartQuadrant otherwise if to is not equal to site 2 of region StartQuadrant or StartQuadrant and not is a friend then site 2 of region StartQuadrant or StartQuadrant otherwise if to is not equal to site 3 of region StartQuadrant or StartQuadrant and not is a friend then site 3 of region StartQuadrant or StartQuadrant otherwise if to is not equal to site 4 of region StartQuadrant or StartQuadrant and not is a friend then site 4 of region StartQuadrant or StartQuadrant otherwise if to is not equal to site 5 of region StartQuadrant or StartQuadrant and not is a friend then site 5 of region StartQuadrant or StartQuadrant otherwise site 6 of region StartQuadrant or StartQuadrant moveRule: true.
Players take turns moving.
Setup:
Place stack of [Disc1] at vertex 7
Place stack of [Disc1] at vertex 11
Place stack of [Disc2] at vertex 19
Place stack of [Disc2] at vertex 23.
Rules:
If not in the same turn, roll the dice and afterwards move one of your pieces.
Aim:
If there are no pieces owned by Player the moving player, the moving player wins If 1 is StartQuadrantFull, player two wins If 2 is StartQuadrantFull, player one wins If not in the same turn and the moving player cannot move, the moving player loses.
"))
(useFor "Ruleset/Andarraya (Ludii 9) (Reconstructed)" (id "4064"))
(useFor "Ruleset/Andarraya (Ludii 10) (Reconstructed)" (rules "The game Andarraya is played by two players on a noshape board with nobasis tiling.
All players play with Discs. The following pieces are shared by all players: Dies with 6 faces valued [1, 2, 3, 4, 5, 6] and Dies with 6 faces valued [1, 2, 3, 4, 5, 6].
Rules for Pieces:
Discs according to the value of the dice, if the number of pips on the dice steps forward from site the location of the piece on track null is equal to -1, remove pieces at the location of the piece, else if not there is an enemy Player at the number of pips on the dice steps forward from site the location of the piece on track null or 1 is equal to the size of the stack on vertex the number of pips on the dice steps forward from site the location of the piece on track null, from vertex in the location of the piece to vertex the number of pips on the dice steps forward from site the location of the piece on track null moveRule: true captureRule: there is an enemy Player at to captureEffect: from vertex in to to vertex Player Player at to's hand site 0 moveRule: true or if the value of Player the moving player is equal to -1, if 1 steps forward from site the location of the piece on track null is equal to -1, remove pieces at the location of the piece, else if not there is an enemy Player at 1 steps forward from site the location of the piece on track null or 1 is equal to the size of the stack on vertex 1 steps forward from site the location of the piece on track null, from vertex in the location of the piece to vertex 1 steps forward from site the location of the piece on track null moveRule: true captureRule: there is an enemy Player at to captureEffect: from vertex in to to vertex Player Player at to's hand site 0 moveRule: true or if 2 steps forward from site the location of the piece on track null is equal to -1, remove pieces at the location of the piece, else if not there is an enemy Player at 2 steps forward from site the location of the piece on track null or 1 is equal to the size of the stack on vertex 2 steps forward from site the location of the piece on track null, from vertex in the location of the piece to vertex 2 steps forward from site the location of the piece on track null moveRule: true captureRule: there is an enemy Player at to captureEffect: from vertex in to to vertex Player Player at to's hand site 0 moveRule: true or if 3 steps forward from site the location of the piece on track null is equal to -1, remove pieces at the location of the piece, else if not there is an enemy Player at 3 steps forward from site the location of the piece on track null or 1 is equal to the size of the stack on vertex 3 steps forward from site the location of the piece on track null, from vertex in the location of the piece to vertex 3 steps forward from site the location of the piece on track null moveRule: true captureRule: there is an enemy Player at to captureEffect: from vertex in to to vertex Player Player at to's hand site 0 moveRule: true or if 4 steps forward from site the location of the piece on track null is equal to -1, remove pieces at the location of the piece, else if not there is an enemy Player at 4 steps forward from site the location of the piece on track null or 1 is equal to the size of the stack on vertex 4 steps forward from site the location of the piece on track null, from vertex in the location of the piece to vertex 4 steps forward from site the location of the piece on track null moveRule: true captureRule: there is an enemy Player at to captureEffect: from vertex in to to vertex Player Player at to's hand site 0 moveRule: true or if 5 steps forward from site the location of the piece on track null is equal to -1, remove pieces at the location of the piece, else if not there is an enemy Player at 5 steps forward from site the location of the piece on track null or 1 is equal to the size of the stack on vertex 5 steps forward from site the location of the piece on track null, from vertex in the location of the piece to vertex 5 steps forward from site the location of the piece on track null moveRule: true captureRule: there is an enemy Player at to captureEffect: from vertex in to to vertex Player Player at to's hand site 0 moveRule: true or if 6 steps forward from site the location of the piece on track null is equal to -1, remove pieces at the location of the piece, else if not there is an enemy Player at 6 steps forward from site the location of the piece on track null or 1 is equal to the size of the stack on vertex 6 steps forward from site the location of the piece on track null, from vertex in the location of the piece to vertex 6 steps forward from site the location of the piece on track null moveRule: true captureRule: there is an enemy Player at to captureEffect: from vertex in to to vertex Player Player at to's hand site 0 moveRule: true if not all dice have been used, move again and set the value of Player the moving player to 1.
Players take turns moving.
Setup:
Place stack of [Disc1] at vertex 6
Place stack of [Disc1] at vertex 4
Place stack of [Disc1] at vertex 12
Place stack of [Disc1] at vertex 23
Place stack of [Disc2] at vertex 18
Place stack of [Disc2] at vertex 16
Place stack of [Disc2] at vertex 0
Place stack of [Disc2] at vertex 11.
Rules:
If not in the same turn, roll the dice and afterwards move one of your pieces.
Aim:
If there are no pieces owned by Player the moving player, the moving player wins.
"))
(useFor "Ruleset/Andarraya (Ludii 10) (Reconstructed)" (id "4065"))
(version "1.3.12")
(classification "board/war/reconstruction/done")
(credit "Eric Piette")
(origin "This game was played in Spain, from around 1493 to 1495.")
}
)
(recon {
(concept "Capture" True)
})
)