Skip to content

Commit

Permalink
tweaked code so now button 99 is recorded in list of moves
Browse files Browse the repository at this point in the history
  • Loading branch information
KhalidIshani committed Feb 4, 2021
1 parent a38352e commit daca05b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/Maze.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'dart:io';
import 'dart:convert';
import 'package:path_provider/path_provider.dart';
import 'PathGeneration.dart';
import 'package:permission_handler/permission_handler.dart';
import 'server.dart';
import 'main.dart';

Expand Down Expand Up @@ -124,6 +121,8 @@ class gameButtonState extends State<gameButton> {
//function executed when any button pressed
void buttonPress()
{
//first add id of button pressed to list of moves
moves.add(widget.id);
//first prevent uesr from making new moves during 250 milisecond animation
timeOut = true;
times.add(clock.elapsedMilliseconds);
Expand Down Expand Up @@ -212,7 +211,6 @@ class gameButtonState extends State<gameButton> {
}

});
moves.add(widget.id);
recentMove=widget.id;
}
@override
Expand Down

0 comments on commit daca05b

Please sign in to comment.