10-30-2020, 11:49 AM
Here is a minimal example:
(game "StackExample"
(players 2)
(equipment {
(board (square 4))
(piece "Disc" Each
(move Step Orthogonal
(to
if:(or
(is Empty (to))
(is Enemy (who at:(to)))
)
(apply (remove (to)))
)
stack:true
)
)
})
(rules
(start {
(place Stack "Disc1" 0 count:2)
(place Stack "Disc1" 1 count:2)
(place Stack "Disc1" 2 count:2)
(place Stack "Disc1" 3 count:2)
(place Stack "Disc2" 12 count:2)
(place Stack "Disc2" 13 count:2)
(place Stack "Disc2" 14 count:2)
(place Stack "Disc2" 15 count:2)
})
(play (forEach Piece))
(end (if (no Moves Next) (result Mover Win)))
)
)
(game "StackExample"
(players 2)
(equipment {
(board (square 4))
(piece "Disc" Each
(move Step Orthogonal
(to
if:(or
(is Empty (to))
(is Enemy (who at:(to)))
)
(apply (remove (to)))
)
stack:true
)
)
})
(rules
(start {
(place Stack "Disc1" 0 count:2)
(place Stack "Disc1" 1 count:2)
(place Stack "Disc1" 2 count:2)
(place Stack "Disc1" 3 count:2)
(place Stack "Disc2" 12 count:2)
(place Stack "Disc2" 13 count:2)
(place Stack "Disc2" 14 count:2)
(place Stack "Disc2" 15 count:2)
})
(play (forEach Piece))
(end (if (no Moves Next) (result Mover Win)))
)
)