I'm trying to code Frisian draughts. I'm not able to make pieces land only on the dark squares after a hop.
This doesn't allow to play any legal moves.
If instead of the line
I wrote
the moving pieces can land in any square after the jumped piece, but with this other line
the pieces can land only on the adjacent square after the jumped piece.
The example game
Thanks in advance.
Code:
(piece "King" Each
(move Hop
Orthogonal
(between
before: 10
after: 10
if: (is Enemy (who at:(between)))
)
(to if: (is In (to) (sites Phase 0)))
)
)
This doesn't allow to play any legal moves.
If instead of the line
Code:
(to if: (is In (to) (sites Phase 0)))
Code:
(to if: (is In (to) (sites Empty)))
Code:
(to if: (is In (to) (sites Phase 1)))
The example game
Code:
(game "Ortho hop"
(players 2)
(equipment {
(board (square 10))
(piece "King" Each
(move Hop
Orthogonal
(between
before: 10
after: 10
if: (is Enemy (who at:(between)))
)
(to if: (is In (to) (sites Phase 0)))
)
)
})
(rules
(start {
(place "King1" {"C5" "E3"})
(place "King2" {"C7" "E5"})
})
(play (forEach Piece) )
(end (if (no Moves Next) (result Mover Win) ) )
)
)
(metadata
(graphics {
(board Style Chess)
})
)
Thanks in advance.