diff --git a/lib/Maze.dart b/lib/Maze.dart index 008f905..b0bf4e1 100644 --- a/lib/Maze.dart +++ b/lib/Maze.dart @@ -120,8 +120,8 @@ class gameButtonState extends State { void newMaze() { - fillMaze(); resetGame(); + fillMaze(); } //function executed when any button pressed diff --git a/lib/PathGeneration.dart b/lib/PathGeneration.dart index 781b509..1a5a643 100644 --- a/lib/PathGeneration.dart +++ b/lib/PathGeneration.dart @@ -6,6 +6,7 @@ import 'main.dart'; void fillMaze() { + mat= [for(var i=0; i<100;i++) i]; path= genPath(mat); //clear board for (int i = 0; i < 100; i++) { @@ -106,8 +107,10 @@ List genPath(List mat) { return path; } - Listmat= [for(var i=0; i<100;i++) i]; + + + diff --git a/lib/main.dart b/lib/main.dart index fac9274..e9741a9 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -34,10 +34,10 @@ int recentMove; //records last move of user regardless of corectness void main() { //manually fill in maze - //for(var i=0; i<19; i++) - //{ - //maze1.button_grid[path[i]].onPath=1; - //} + /*for(var i=0; i<19; i++) + { + maze1.button_grid[path[i]].onPath=1; + }*/ for(int j=0; j<27; j++) { (maze1.button_grid[path[j]]).onPath=1; diff --git a/lib/startingScreen.dart b/lib/startingScreen.dart index f5fbe11..3226631 100644 --- a/lib/startingScreen.dart +++ b/lib/startingScreen.dart @@ -1,10 +1,11 @@ + import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'main.dart'; import 'Maze.dart'; import 'MazeTest.dart'; -import 'detection.dart'; +//import 'detection.dart'; class startingScreen extends StatefulWidget { @override @@ -31,27 +32,29 @@ class startingScreenState extends State { ), Row( children: [ + Column( children: [ Container( - margin:EdgeInsets.all(10.0), + margin:EdgeInsets.symmetric(horizontal:45.0,vertical: 10.0), child: SizedBox( width:55.0, height:55.0, - child: new RaisedButton( + child: new FlatButton( + color: Colors.blue, padding: EdgeInsets.all(0.0), child: Image.asset("assets/mazeimage2.PNG", fit:BoxFit.fill), onPressed:() { Navigator.push( context, - new MaterialPageRoute(builder: (context) => maze1), + new MaterialPageRoute(builder: (context) => maze2), ); } ) ), ), Container( - child: new Text("GMT-10x10", style:new TextStyle(color:Colors.white)), + child: new Text("GMT-6x6", style:new TextStyle(color:Colors.white)), ) ], @@ -60,32 +63,30 @@ class startingScreenState extends State { Column( children: [ Container( - margin:EdgeInsets.symmetric(horizontal:45.0,vertical: 10.0), + margin:EdgeInsets.all(10.0), child: SizedBox( width:55.0, height:55.0, - child: new FlatButton( - color: Colors.blue, + child: new RaisedButton( padding: EdgeInsets.all(0.0), child: Image.asset("assets/mazeimage2.PNG", fit:BoxFit.fill), onPressed:() { Navigator.push( context, - new MaterialPageRoute(builder: (context) => maze2), + new MaterialPageRoute(builder: (context) => maze1), ); } ) ), ), Container( - child: new Text("GMT-6x6", style:new TextStyle(color:Colors.white)), + child: new Text("GMT-10x10", style:new TextStyle(color:Colors.white)), ) ], ), - - Column( + /*Column( children: [ Container( margin:EdgeInsets.symmetric(horizontal:45.0,vertical: 10.0), @@ -108,9 +109,9 @@ class startingScreenState extends State { Container( child: new Text("DetectionTask", style:new TextStyle(color:Colors.white)), ) - ], ), + */ ], ) diff --git a/pubspec.lock b/pubspec.lock index bafcac6..2900035 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -150,7 +150,7 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "1.6.27" + version: "1.6.28" path_provider_linux: dependency: transitive description: