From 527f6d770e2fd4b7c196fecaf469a2b09dfe2657 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sun, 15 Nov 2020 18:32:03 +0800 Subject: [PATCH] =?UTF-8?q?flutter:=20battle.dart=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E4=BA=9B=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/flutter/lib/game/battle.dart | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/ui/flutter/lib/game/battle.dart b/src/ui/flutter/lib/game/battle.dart index 73a80ce2..d2ae022a 100644 --- a/src/ui/flutter/lib/game/battle.dart +++ b/src/ui/flutter/lib/game/battle.dart @@ -27,6 +27,41 @@ class Battle { Position _position; int _focusIndex, _blurIndex; + String sideToMove; + + // 是否黑白反转 + bool isInverted; + + Map isAiPlayer = {Color.black: false, Color.white: false}; + + // 是否有落子动画 + bool hasAnimation; + + // 动画持续时间 + int durationTime; + + // 是否有落子音效 + static bool hasSound = true; + + // 是否必败时认输 + bool resignIfMostLose_ = false; + + // 是否自动交换先后手 + bool isAutoChangeFirstMove = false; + + // AI 是否为先手 + bool isAiFirstMove = false; + + // 规则号 + int ruleIndex; + + // 提示语 + String tips; + + List cmdlist; + + String getTips() => tips; + static get shared { _instance ??= Battle(); return _instance;