kreibaum / pacosako

This code drives the pacoplay.com website where you can play Paco Ŝako.
http://pacoplay.com
MIT License
23 stars 3 forks source link

Replay partially missing #104

Closed kreibaum closed 1 year ago

kreibaum commented 1 year ago

The replay in https://pacoplay.com/game/6472 is missing the last move.

kreibaum commented 1 year ago

https://pacoplay.com/game/6477

kreibaum commented 1 year ago

https://pacoplay.com/game/13838

kreibaum commented 1 year ago

This always happens when a pawn unites with the enemy king on the home row. Here is a minimal reproduction: https://dev.pacoplay.com/replay/305

The previous examples all had chains as last move, but this is not required.

This does not happen if the pawn-king union happens on any other row: https://dev.pacoplay.com/replay/306

kreibaum commented 1 year ago

The issue was, that "half moves" would only be considered finished when the controlling player changes. This doesn't properly happen when there is a promotion at the end of the move. Now ending the game is also added.

There is still the related issue of a non-finished half move not showing up in the replay, but I'll not worry about that issue with this ticket.