invalid choice dialog

This commit is contained in:
2024-12-27 22:22:40 -05:00
parent dbd492969a
commit 25483be0ae

View File

@@ -72,6 +72,19 @@ class _SuperGameState extends State<SuperGame> {
turn: turn,
cellOnTapCallback: (int i) {
if (!_checkValidChoice(data[subGame], i)) {
showDialog(
context: context,
builder: (context) => AlertDialog(
content:
Text("${data[subGame][i].name.toUpperCase()}"
" already claimed "
"[${i % 3}, ${(i / 3).floor()}]"),
actions: [
ElevatedButton(
onPressed: () => Navigator.pop(context),
child: const Text("Close"))
],
));
return;
}