flutter: recorder 如果插入和上着相同的着法则 assert

This commit is contained in:
Calcitem 2020-11-27 00:51:47 +08:00
parent 5cca309fa4
commit 6d201116a8
1 changed files with 4 additions and 0 deletions

View File

@ -59,6 +59,10 @@ class GameRecorder {
fullMove++;
}
if (_history.length > 0) {
assert(_history[_history.length - 1].move != move.move);
}
_history.add(move);
if (move.type == MoveType.remove) {