Exemplo n.º 1
0
        public void Initialize()
        {
            gameState.IsGameOver = false;
            Coordinate snakeStartingPosition = grid.GetGridCenter();

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

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