This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:theseus/theseus.dart'; | |
import 'package:theseus/src/formatters/formatters.dart' as formatters; | |
main(List<String> arguments) { | |
var mazeOption = MazeOptions(width: 8, height: 8); | |
var orthogonalMaze = OrthogonalMaze(mazeOption); | |
print("generating the maze..."); | |
orthogonalMaze.generate(); | |
printMaze(orthogonalMaze); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mode: ASCIIMode.lines | |
_________________ | |
_____ | _ | | |
|_ | _|___| _| | |
| _|___ |_ | | |
| | ___|_ | | | |
| | | | _ |_| | | |
| |_| | | | | _| | |
| | | | | | | | | |
|_|_|_____|______ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:ui'; | |
import 'package:box2d_flame/box2d.dart'; | |
import 'package:mazeball/game.dart'; | |
import 'package:mazeball/helper.dart'; | |
class Wall { | |
//Ref to our game object | |
final MazeBallGame game; | |
//Size of the ball, radius in meter | |
static final double wallWidth = 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:ui'; | |
import 'package:box2d_flame/box2d.dart' as box2d; | |
import 'package:mazeball/Elements/wall.dart'; | |
import 'package:mazeball/game.dart'; | |
import 'package:theseus/theseus.dart'; | |
class MazeBuilder { | |
//Size of the maze | |
int _width; | |
int _height; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/widgets.dart'; | |
import 'package:mazeball/Views/base/viewSwtichMessage.dart'; | |
import 'package:mazeball/Views/viewManager.dart'; | |
enum GameView { | |
MainMenuBackground, | |
Playing, | |
Win, | |
Options, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:ui'; | |
import 'package:mazeball/Views/base/baseView.dart'; | |
import 'package:mazeball/Views/mainMenuBackground.dart'; | |
import 'package:mazeball/Views/optionBackground.dart'; | |
import 'package:mazeball/Views/playingView.dart'; | |
import 'package:mazeball/game.dart'; | |
import 'base/viewSwtichMessage.dart'; | |
class ViewManager { | |
List<BaseView> views; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var prefs = await SharedPreferences.getInstance(); | |
var savedHeight = prefs.getInt("maze_height") ?? 8; | |
var savedWidth = prefs.getInt("maze_width") ?? 8; | |
await prefs.setInt("maze_width", toInt(widthController.text,defaultValue: 8)); | |
await prefs.setInt("maze_height", toInt(heightController.text,defaultValue: 8)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
import 'package:sirflutter/simulation_data.dart'; | |
typedef SettingChangedCallback = void Function(SirSimulation data); | |
class Settings extends StatelessWidget { | |
final VoidCallback expandToggleTap; | |
final SettingChangedCallback settingChangedCallback; |