public void TestMovePlayerOnIncorrectPositionShouldThrow()
        {
            PlayFldGen generator = new PlayFldGen(new Position(1, 1));

            IPlayField playField = new PlayField(generator, new Position(1, 1));
            playField.InitializePlayFieldCells(RandomNumberGenerator.Instance);

            generator.ChangeCellAtPosition(new Position(1, 2), Constants.StandardGameCellWallValue);

            IPlayer player = new Player("Test", playField.GetCell(new Position(1, 1)));
            playField.RemovePlayer(player);
            playField.AddPlayer(player, new Position(1, 2));
        }
예제 #2
0
        public void TestMovePlayerOnIncorrectPositionShouldThrow()
        {
            PlayFldGen generator = new PlayFldGen(new Position(1, 1));

            IPlayField playField = new PlayField(generator, new Position(1, 1));

            playField.InitializePlayFieldCells(RandomNumberGenerator.Instance);

            generator.ChangeCellAtPosition(new Position(1, 2), Constants.StandardGameCellWallValue);

            IPlayer player = new Player("Test", playField.GetCell(new Position(1, 1)));

            playField.RemovePlayer(player);
            playField.AddPlayer(player, new Position(1, 2));
        }