public void Init(bool isFirstGame = true) { SetState(GameState.Ready); System.Diagnostics.Debug.WriteLine("Start"); totalElapsedSeconds = 0; drawer = Context.Instance.Drawer; IMazeGenerator generator = new RecursiveGenerator(); maze = generator.Generate(Context.Instance.TileWidth, Context.Instance.TileHeight); world = new World(); world.Init(maze, Context.Instance.ScreenWidth - H_OFFSET, Context.Instance.ScreenHeight - V_OFFSET, 10, H_OFFSET / 2); centerPoint = world.FindCenterPoint(); pathFinder = new AStarFinder(); pathFinder.Init(maze.Tiles, Context.Instance.TileWidth); InitWalls(); InitFood(); InitCharacters(); InitDirectionButtons(); InitFunctionalButtons(); InitText(); }