flutter: Ignore board tapping when engineType is aiVsAi
This commit is contained in:
parent
cf44c3f57a
commit
b1ce6c61e8
|
@ -125,7 +125,9 @@ class _GamePageState extends State<GamePage> with RouteAware {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Game.instance.engineType == EngineType.testViaLAN) {
|
if (Game.instance.engineType == EngineType.aiVsAi ||
|
||||||
|
Game.instance.engineType == EngineType.testViaLAN) {
|
||||||
|
print("Engine type is no human, ignore tapping.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,7 +375,7 @@ class _GamePageState extends State<GamePage> with RouteAware {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
print("Engine to go");
|
print("Engine to go, engine type is ${widget.engineType}");
|
||||||
|
|
||||||
while ((Config.isAutoRestart == true ||
|
while ((Config.isAutoRestart == true ||
|
||||||
Game.instance.position.winner == PieceColor.nobody) &&
|
Game.instance.position.winner == PieceColor.nobody) &&
|
||||||
|
@ -394,7 +396,7 @@ class _GamePageState extends State<GamePage> with RouteAware {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print("Waiting for engine's response...");
|
print("Searching...");
|
||||||
final response = await widget.engine.search(Game.instance.position);
|
final response = await widget.engine.search(Game.instance.position);
|
||||||
print("Engine response type: ${response.type}");
|
print("Engine response type: ${response.type}");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue