public void PacmanAfterMovedIsEmpty()
 {
     var grid = new Grid(3, 3);
     grid.PlacePacmanAt(0, 0);
     grid.MovePacmanTo(1, 0);
     Assert.Equal(' ', grid.At(0, 0));
 }
        public void PacmanIsOnDefinedPositionAndGridIsStillFilledByDots()
        {
            var grid = new Grid(3, 3);

            grid.PlacePacmanAt(0, 0);
            Assert.Equal('.', grid.At(1, 1));
        }
        public void PacmanIsOnDefinedPosition()
        {
            var grid = new Grid(3, 3);

            grid.PlacePacmanAt(0, 0);
            Assert.Equal(PacmanDirectionNone, grid.At(0, 0));
        }
        public void CellWithPacmanIsNotFilledWithDot()
        {
            var grid           = new Grid(4, 8);
            var originPosition = new Position(0, 0);

            grid.PlacePacManAt(originPosition);
            Assert.NotEqual(Grid.FilledCell, grid.At(originPosition));
        }
        public void PacmanAfterMovedIsEmpty()
        {
            var grid = new Grid(3, 3);

            grid.PlacePacmanAt(0, 0);
            grid.MovePacmanTo(1, 0);
            Assert.Equal(' ', grid.At(0, 0));
        }
        public void CellNearPacmanIsFilledWithDot()
        {
            var grid                 = new Grid(4, 8);
            var originPosition       = new Position(0, 0);
            var positionNextToActual = new Position(1, 0);

            grid.PlacePacManAt(originPosition);
            Assert.Equal(Grid.FilledCell, grid.At(positionNextToActual));
        }
        public void AllCellsVisitedByPacManAreNotFilledWithDots()
        {
            var grid = new Grid(4, 8);
            var originPosition = new Position(0, 0);
            var positionNextToActual = new Position(1, 0);

            grid.PlacePacManAt(originPosition);
            grid.MovePacManTo(positionNextToActual);
            Assert.NotEqual(Grid.FilledCell, grid.At(originPosition));
        }
        public void AllCellsVisitedByPacManAreNotFilledWithDots()
        {
            var grid                 = new Grid(4, 8);
            var originPosition       = new Position(0, 0);
            var positionNextToActual = new Position(1, 0);

            grid.PlacePacManAt(originPosition);
            grid.MovePacManTo(positionNextToActual);
            Assert.NotEqual(Grid.FilledCell, grid.At(originPosition));
        }
 private static void AssertFilledWithDots(Grid grid, int width, int height)
 {
     for (var x = 0; x < width; x++)
     {
         for (var y = 0; y < height; y++)
         {
             var position = new Position(x, y);
             Assert.Equal(Grid.FilledCell, grid.At(position));
         }
     }
 }
        public void PacmanMovesAfterTick(Game.Direction direction, int nextX, int nextY)
        {
            var grid                 = new Grid(4, 8);
            var originPosition       = new Position(0, 0);
            var positionNextToActual = new Position(nextX, nextY);

            grid.PlacePacManAt(originPosition);
            var game = new Game(grid);

            game.PacmanDirection = direction;
            game.Tick();
            Assert.Equal(Grid.PacMan, grid.At(positionNextToActual));
        }
 public void GridIsFilledByDots()
 {
     var grid = new Grid(3, 3);
     Assert.Equal('.', grid.At(0, 0));
 }
        public void CellNearPacmanIsFilledWithDot()
        {
            var grid = new Grid(4, 8);
            var originPosition = new Position(0, 0);
            var positionNextToActual = new Position(1, 0);

            grid.PlacePacManAt(originPosition);
            Assert.Equal(Grid.FilledCell, grid.At(positionNextToActual));
        }
 private static void AssertFilledWithDots(Grid grid, int width, int height)
 {
     for (var x = 0; x < width; x++)
     {
         for (var y = 0; y < height; y++)
         {
             var position = new Position(x, y);
             Assert.Equal(Grid.FilledCell, grid.At(position));
         }
     }
 }
        public void PacmanMovesAfterTick(Game.Direction direction, int nextX, int nextY)
        {
            var grid = new Grid(4, 8);
            var originPosition = new Position(0, 0);
            var positionNextToActual = new Position(nextX, nextY);

            grid.PlacePacManAt(originPosition);
            var game = new Game(grid);
            game.PacmanDirection = direction;
            game.Tick();
            Assert.Equal(Grid.PacMan, grid.At(positionNextToActual));
        }
        public void GridIsFilledByDots()
        {
            var grid = new Grid(3, 3);

            Assert.Equal('.', grid.At(0, 0));
        }
 public void PacmanIsOnDefinedPosition()
 {
     var grid = new Grid(3, 3);
     grid.PlacePacmanAt(0, 0);
     Assert.Equal(PacmanDirectionNone, grid.At(0, 0));
 }
 public void PacmanIsOnDefinedPositionAndGridIsStillFilledByDots()
 {
     var grid = new Grid(3, 3);
     grid.PlacePacmanAt(0, 0);
     Assert.Equal('.', grid.At(1, 1));
 }
 public void CellWithPacmanIsNotFilledWithDot()
 {
     var grid = new Grid(4, 8);
     var originPosition = new Position(0, 0);
     grid.PlacePacManAt(originPosition);
     Assert.NotEqual(Grid.FilledCell, grid.At(originPosition));
 }