public void ContractReCoincheNotValid() { bool isRespected = false; bool hasThrown = false; try { GameTest test = new GameTest(GameMode.ClassicHeart, CardColor.Heart); var game = test.game; var team = test.game.Teams; test.Prepare(new Contract(Promise.Points100, team[0].Players[0])); team[0].ScoreCurrent = 90; test.game.Contract.ChangeContract(Promise.Coinche, team[1].Players[0], team[0].Players[0]); test.game.Contract.ChangeContract(Promise.ReCoinche, team[0].Players[0], team[1].Players[0]); isRespected = Contract.IsPromiseRespected(game, team[0], team[1]); } catch (Exception) { isRespected = false; hasThrown = true; } Assert.AreEqual(false, isRespected); Assert.AreEqual(false, hasThrown); }
public void ContractFoldGeneraNotlRespectedEnemy() { bool isRespected = false; bool hasThrown = false; try { GameTest test = new GameTest(GameMode.ClassicHeart, CardColor.Heart); var game = test.game; var team = test.game.Teams; test.Prepare(new Contract(Promise.General, team[0].Players[0], team[0].Players[0])); game.Run(false); team[0].Players[0].WinFold(); game.Run(false); team[1].Players[0].WinFold(); game.Run(false); team[0].Players[0].WinFold(); isRespected = Contract.IsPromiseRespected(game, team[0], team[1]); } catch (Exception) { isRespected = false; hasThrown = true; } Assert.AreEqual(false, isRespected); Assert.AreEqual(false, hasThrown); }