Beispiel #1
0
        public void Moving_to_closed_door_opens_door_without_moving()
        {
            var startingCoord = new Coord(3, 3);

            player.MoveTo(startingCoord);
            var doorSpace = _gameState.Map.SpaceMap.GetItem((3, 4));

            Assert.That(player.GetPosition(), Is.EqualTo(startingCoord));
            Assert.That(doorSpace.Terrain.Name, Is.EqualTo(TerrainEnum.DoorClosed));

            var cmd = new Command(CmdAction.Direction, CmdDirection.South, null);

            _controls.CommandBeing(player, cmd);

            Assert.That(player.GetPosition(), Is.EqualTo(startingCoord));
            Assert.That(doorSpace.Terrain.Name, Is.EqualTo(TerrainEnum.DoorOpen));
            __schedule.Received().AddAgent(player, 4);
        }
Beispiel #2
0
 public void SetUp()
 {
     player = BeingCreator.CreateBeing("Suvail");
     player.MoveTo(_gameState.Map.BeingMap);
     Equipper = SourceMe.The <Equipper>();
 }