These work in theory, but if I try to compile Yonin Shogi.lud with either of these functions implemented, Ludii spits out this error message:
Unexpected syntax 'Mover' in '(% Mover 2)'.
Edit: I see what is going on. It needs Mover for the rule enforcement portion and (mover) for the modulus operation. Thanks for the help.
Edit: It works now, but now I noticed another bug, and as luck would have it, it involves the Drop Pawn Mate rule, specifically for the players who are not next in line to move.
Edit: I still can't believe it, but I actually managed to fix the Drop Pawn Mate bug all by myself:
// Fixed PlacePawn by RubixOne
(define "PlacePawn"
(do
(move
(from (sites Occupied by:#1 container:"Hand" component:"Fuhyo"))
(to (difference (sites Empty) (sites #1 "LastRank"))
if:("OnePawnPerColumn" #1 #2)
)
)
ifAfterwards:(not (or {
(and ("IsInCheck" "Osho" P1) ("CanNotMove" P1 1))
(and ("IsInCheck" "Osho" P2) ("CanNotMove" P2 2))
(and ("IsInCheck" "Osho" P3) ("CanNotMove" P3 3))
(and ("IsInCheck" "Osho" P4) ("CanNotMove" P4 4))
}))
)
)
Unexpected syntax 'Mover' in '(% Mover 2)'.
Edit: I see what is going on. It needs Mover for the rule enforcement portion and (mover) for the modulus operation. Thanks for the help.
Edit: It works now, but now I noticed another bug, and as luck would have it, it involves the Drop Pawn Mate rule, specifically for the players who are not next in line to move.
Edit: I still can't believe it, but I actually managed to fix the Drop Pawn Mate bug all by myself:
// Fixed PlacePawn by RubixOne
(define "PlacePawn"
(do
(move
(from (sites Occupied by:#1 container:"Hand" component:"Fuhyo"))
(to (difference (sites Empty) (sites #1 "LastRank"))
if:("OnePawnPerColumn" #1 #2)
)
)
ifAfterwards:(not (or {
(and ("IsInCheck" "Osho" P1) ("CanNotMove" P1 1))
(and ("IsInCheck" "Osho" P2) ("CanNotMove" P2 2))
(and ("IsInCheck" "Osho" P3) ("CanNotMove" P3 3))
(and ("IsInCheck" "Osho" P4) ("CanNotMove" P4 4))
}))
)
)