flutter: 避免棋局结束后弹框进入死循环必须杀死才行
This commit is contained in:
parent
ffa1d494cb
commit
5cca309fa4
|
@ -205,7 +205,8 @@ class _GamePageState extends State<GamePage> {
|
|||
|
||||
engineToGo() async {
|
||||
// TODO
|
||||
while (Game.shared.position.sideToMove() == Color.white) {
|
||||
while (Game.shared.position.winner == Color.nobody &&
|
||||
Game.shared.position.sideToMove() == Color.white) {
|
||||
changeStatus('对方思考中...');
|
||||
|
||||
final response = await widget.engine.search(Game.shared.position);
|
||||
|
|
Loading…
Reference in New Issue