flutter: recorder 如果插入和上着相同的着法则 assert
This commit is contained in:
parent
5cca309fa4
commit
6d201116a8
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue