01-04-2021, 09:13 AM
Hi,
Ok that's not a bug but a problem in your description.
I will not be specific to the case where the leader piece is there or not but just explaining in a general way.
Your play moves are:
So here, at any move you check the move generator in each piece and if the move is in the same turn you can pass.
BUT in the move generator, you check also the "SameTurn" for the movement of the piece.
Consequently for each piece you will check that in allowing a (move Hop ....) from the last To.
That is a problem.
That "SameTurn" check, should not be in the piece generator but in the (play ...) with the (move Pass ...) because that move is not related to each piece but to the last piece moved.
For the GUI bug you mentioned with your example with the leader piece and the restart of the game, that's something else not related to that issue, but I notified Matthew and he will fix it.
Regards,
Eric
Ok that's not a bug but a problem in your description.
I will not be specific to the case where the leader piece is there or not but just explaining in a general way.
Your play moves are:
Code:
(play
(or
(forEach Piece)
(if "SameTurn"
(move Pass)
)
)
)
So here, at any move you check the move generator in each piece and if the move is in the same turn you can pass.
BUT in the move generator, you check also the "SameTurn" for the movement of the piece.
Consequently for each piece you will check that in allowing a (move Hop ....) from the last To.
That is a problem.
That "SameTurn" check, should not be in the piece generator but in the (play ...) with the (move Pass ...) because that move is not related to each piece but to the last piece moved.
For the GUI bug you mentioned with your example with the leader piece and the restart of the game, that's something else not related to that issue, but I notified Matthew and he will fix it.
Regards,
Eric