From 6d201116a800866d91640ef225831d21f74ad116 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Fri, 27 Nov 2020 00:51:47 +0800 Subject: [PATCH] =?UTF-8?q?flutter:=20recorder=20=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E5=92=8C=E4=B8=8A=E7=9D=80=E7=9B=B8=E5=90=8C?= =?UTF-8?q?=E7=9A=84=E7=9D=80=E6=B3=95=E5=88=99=20assert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/flutter/lib/mill/recorder.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ui/flutter/lib/mill/recorder.dart b/src/ui/flutter/lib/mill/recorder.dart index 2d31828e..60dfe13e 100644 --- a/src/ui/flutter/lib/mill/recorder.dart +++ b/src/ui/flutter/lib/mill/recorder.dart @@ -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) {