invalid choice dialog
This commit is contained in:
parent
dbd492969a
commit
25483be0ae
|
|
@ -72,6 +72,19 @@ class _SuperGameState extends State<SuperGame> {
|
||||||
turn: turn,
|
turn: turn,
|
||||||
cellOnTapCallback: (int i) {
|
cellOnTapCallback: (int i) {
|
||||||
if (!_checkValidChoice(data[subGame], 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue