public void ShouldThrowExceptionIfBattleOverAndActionPerformed()
        {
            var g = new Game
            {
                CurrentBattleDetails = new BattleDetails
                {
                    BattleStatus = BattleStatus.InBattle,
                    BattleMode = BattleMode.PlayerVsComputer
                },
                Player = new Player()
            };
            g.Player.SetName("Player");
            g.Player.ChangeAlliance(Alliance.TeamOne);
            g.CurrentBattleDetails.Participants.Add(new Participant
            {
                Character = g.Player,
                Status = ParticipantStatus.InBattle
            });
            var b = new Dumbass();
            b.ChangeAlliance(Alliance.TeamTwo);
            b.SetName("Dumbass");
            g.CurrentBattleDetails.Participants.Add(new Participant
            {
                Character = b,
                Status = ParticipantStatus.InBattle
            });
            g.EndBattle(Alliance.TeamOne);

            g.CurrentBattleDetails.Arena.AddCharacterToArena(g.Player, 0, 0);
            var tile = g.CurrentBattleDetails.Arena.SelectFloorTile(new ArenaFloorPosition(0, 1));
            var actions = g.Player.TargetTileAndSelectActions(tile);
            g.PerformPlayerAction(actions.Find(i => i.Name == "Run"));
        }
Пример #2
0
 public void ShouldChangeAlliance()
 {
     var bot = new Dumbass();
     bot.ChangeAlliance(Alliance.TeamOne);
     Assert.IsTrue(bot.GetAlliance() == Alliance.TeamOne);
 }