RSG-Group/RSG-Chess-API

Checkmate not detected after pawn promotion

radi-cho opened this issue · 4 comments

@retrixe has reported a case of a skipped move after pawn promotion.
Encoded game.turn history to be used for reproducing the issue:

mX2FhU1;cY0DlZFP^JPYbY(ZXEZ(UBDNBN/CN;$E;(&Ji^CM]SJ&`VMVaVE<SI<WjaWaka.B(;&J;NJ&NB-AB-%$-!+?!6#Z6KZcnmcZK?,6?,$%,A6AmlZlal'<_U<'VLALUL':LB:BlmB-gk%$kl&Jlj$%^CJ&C-"5-8&8j85"86".6h.&hj&9I?9&?5&95+9&+!&9!%

Any comments or additional information are greatly appreciated in this discussion, @retrixe.
Thanks :)

Not exactly checkmate, think it skipped the other player's move or failed to detect a check on the king since I didn't notice exactly what happened during the gameplay.

[{"x":6,"y":7},{"x":5,"y":5},{"x":7,"y":1},{"x":7,"y":3},{"x":1,"y":7},{"x":2,"y":5},{"x":6,"y":1},{"x":6,"y":2},{"x":6,"y":6},{"x":6,"y":5},{"x":5,"y":1},{"x":5,"y":3},{"x":5,"y":7},{"x":7,"y":5},{"x":7,"y":3},{"x":7,"y":4},{"x":1,"y":6},{"x":1,"y":4},{"x":7,"y":4},{"x":6,"y":5},{"x":5,"y":6},{"x":6,"y":5},{"x":7,"y":0},{"x":7,"y":5},{"x":5,"y":5},{"x":6,"y":3},{"x":7,"y":5},{"x":7,"y":0},{"x":2,"y":5},{"x":3,"y":3},{"x":5,"y":3},{"x":5,"y":4},{"x":3,"y":3},{"x":5,"y":4},{"x":4,"y":1},{"x":4,"y":3},{"x":5,"y":4},{"x":6,"y":2},{"x":3,"y":0},{"x":6,"y":3},{"x":6,"y":2},{"x":7,"y":0},{"x":5,"y":0},{"x":1,"y":4},{"x":2,"y":7},{"x":1,"y":6},{"x":4,"y":3},{"x":4,"y":4},{"x":0,"y":6},{"x":0,"y":5},{"x":1,"y":4},{"x":5,"y":0},{"x":3,"y":6},{"x":3,"y":5},{"x":4,"y":4},{"x":3,"y":5},{"x":4,"y":6},{"x":3,"y":5},{"x":6,"y":3},{"x":7,"y":2},{"x":0,"y":5},{"x":0,"y":4},{"x":7,"y":2},{"x":4,"y":5},{"x":3,"y":7},{"x":4,"y":6},{"x":4,"y":5},{"x":4,"y":6},{"x":4,"y":7},{"x":4,"y":6},{"x":3,"y":1},{"x":3,"y":3},{"x":7,"y":0},{"x":6,"y":2},{"x":5,"y":0},{"x":1,"y":4},{"x":6,"y":2},{"x":5,"y":4},{"x":1,"y":4},{"x":5,"y":0},{"x":5,"y":4},{"x":3,"y":3},{"x":2,"y":1},{"x":2,"y":3},{"x":3,"y":3},{"x":2,"y":1},{"x":4,"y":0},{"x":3,"y":0},{"x":2,"y":1},{"x":0,"y":0},{"x":0,"y":1},{"x":0,"y":3},{"x":0,"y":0},{"x":1,"y":2},{"x":2,"y":0},{"x":7,"y":5},{"x":1,"y":2},{"x":2,"y":4},{"x":7,"y":5},{"x":6,"y":6},{"x":7,"y":7},{"x":6,"y":7},{"x":6,"y":6},{"x":7,"y":5},{"x":2,"y":4},{"x":0,"y":3},{"x":1,"y":1},{"x":1,"y":2},{"x":0,"y":3},{"x":1,"y":1},{"x":3,"y":0},{"x":4,"y":0},{"x":1,"y":1},{"x":2,"y":3},{"x":1,"y":2},{"x":2,"y":3},{"x":6,"y":7},{"x":5,"y":7},{"x":7,"y":5},{"x":5,"y":7},{"x":4,"y":6},{"x":5,"y":7},{"x":6,"y":0},{"x":7,"y":2},{"x":2,"y":6},{"x":2,"y":5},{"x":7,"y":2},{"x":6,"y":0},{"x":3,"y":5},{"x":3,"y":4},{"x":2,"y":3},{"x":3,"y":4},{"x":2,"y":5},{"x":3,"y":4},{"x":6,"y":0},{"x":5,"y":2},{"x":3,"y":4},{"x":3,"y":3},{"x":5,"y":2},{"x":3,"y":3},{"x":5,"y":7},{"x":6,"y":7},{"x":3,"y":3},{"x":2,"y":1},{"x":0,"y":7},{"x":4,"y":7},{"x":4,"y":0},{"x":3,"y":0},{"x":4,"y":7},{"x":5,"y":7},{"x":5,"y":0},{"x":1,"y":4},{"x":5,"y":7},{"x":3,"y":7},{"x":3,"y":0},{"x":4,"y":0},{"x":1,"y":6},{"x":4,"y":3},{"x":1,"y":4},{"x":5,"y":0},{"x":4,"y":3},{"x":2,"y":1},{"x":1,"y":0},{"x":0,"y":2},{"x":2,"y":1},{"x":3,"y":2},{"x":5,"y":0},{"x":3,"y":2},{"x":3,"y":7},{"x":3,"y":2},{"x":0,"y":2},{"x":1,"y":0},{"x":3,"y":2},{"x":1,"y":2},{"x":1,"y":0},{"x":3,"y":1},{"x":1,"y":2},{"x":1,"y":7},{"x":3,"y":1},{"x":5,"y":0},{"x":1,"y":7},{"x":3,"y":7},{"x":5,"y":0},{"x":4,"y":2},{"x":0,"y":4},{"x":0,"y":3},{"x":4,"y":2},{"x":5,"y":0},{"x":0,"y":3},{"x":0,"y":2},{"x":5,"y":0},{"x":4,"y":2},{"x":0,"y":2},{"x":0,"y":1},{"x":4,"y":2},{"x":5,"y":0},{"x":0,"y":1},{"x":0,"y":0},{"x":5,"y":0},{"x":4,"y":2},{"x":0,"y":0},{"x":4,"y":0}]

After a bit of investigation I've concluded this is not a bug with the chess API. The check and checkmate detection methods are called after pawn promotion so it should not be caused by them as well. As @retrixe said, (probably) there's just a skipped move and perhaps the issue is related to the web client of RSG Chess. To confirm this, I've played the hole game by hand on RSG Chess mobile and could not find any issues there. Considering moving this to the https://github.com/RSG-Group/RSG-Chess-website repository.