Пример #1
0
 public BattlePresenter(BattleUserControl view)
 {
     View = view;
     Game = new GameMaster(ProgramData.PlayerName);
     View.BattleFirstPlayerName = Game.Human.Name;
     View.BattleFirstPlayerHpMax = Game.Human.MaxHp;
     View.BattleSecondPlayerName = Game.Npc.Name;
     View.BattleSecondPlayerHpMax = Game.Npc.MaxHp;
     RefreshHealthProgressBars();
     View.CreateRadioButtons();
     Game.Human.Blocked += Player_Blocked;
     Game.Human.Wounded += Player_Wounded;
     Game.Npc.Blocked += Player_Blocked;
     Game.Npc.Wounded += Player_Wounded;
     Game.Battle.Dead += Player_Dead;
     Game.Battle.Lose += Game_Battle_Lose;
     Game.Battle.Win += Game_Battle_Win;
     Game.Battle.Draw += Game_Battle_Draw;
 }
Пример #2
0
 public void NewBattleWhiteSpacedPlayerName()
 {
     GameMaster Battle = new GameMaster(" ");
     Assert.AreEqual(Battle.Human.Name, "Jack", "WhiteSpaced player name don't changed to default name 'Jack'");
 }
Пример #3
0
 public void NewBattlePlayerNameFromForm()
 {
     GameMaster Battle = new GameMaster("Player");
     Assert.AreEqual(Battle.Human.Name, "Player", "Recived name form form not 'Player'");
 }
Пример #4
0
 public void NewBattleNullPlayerName()
 {
     GameMaster Battle = new GameMaster(null);
     Assert.AreEqual(Battle.Human.Name, "Jack", "Nulled player name don't changed to default name 'Jack'");
 }