Exemple #1
0
        public void Initialize()
        {
            gameState.IsGameOver = false;
            Coordinate snakeStartingPosition = grid.GetGridCenter();

            snake          = new Snake(snakeStartingPosition);
            timer.Elapsed += Update;
        }
Exemple #2
0
        public void Reset()
        {
            grid      = new SquareGrid(configuration.GridSideLength);
            gameState = new GameState();
            Coordinate snakeStartingPosition = grid.GetGridCenter();

            snake = new Snake(snakeStartingPosition);
            inputSystem.ResetToDefaults();
        }