public void StartSecondGameAndCheckNeededBlindOfBothPlayers() { //Arrange var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).BlindsPosted(); //Act nfo.CurrentPlayerFolds(); // This will start a new game ! var res = nfo.BlindNeeded(nfo.P1) != nfo.BlindNeeded(nfo.P2); //Assert Assert.AreEqual(true, res, "The second game should need a big blind and a small blind, not two big blinds"); }
public void AnteGame4PEverybodyIsBlind() { //Arrange var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Antes), new NbPlayersModule(4)).WithAllPlayersSeated(); //Act var res = nfo.Players.Count(x => nfo.BlindNeeded(x) > 0); //Assert Assert.AreEqual(4, res, "SeatOfDealer should be the small blind"); }
public void StartGameAndTryPutBlind() { //Arrange var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).WithAllPlayersSeated(); //Act var res = nfo.Game.PlayMoney(nfo.P1, nfo.BlindNeeded(nfo.P1)); //Assert Assert.AreEqual(true, res, "The game should accept a perfect blind"); }
public void StartGameAndTryPutBlindLessThanNeeded() { //Arrange var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).WithAllPlayersSeated(); //Act var res = nfo.Game.PlayMoney(nfo.P1, nfo.BlindNeeded(nfo.P1) - 1); //Assert Assert.AreEqual(false, res, "The game should not accept any blind that is under what is needed unless that is all the player got"); }
public void StartGameAndCheckNeededBlindP2() { //Arrange var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).WithAllPlayersSeated(); //Act var res = nfo.BlindNeeded(nfo.P2); //Assert Assert.AreNotEqual(0, res, "The game should need a blind from p2"); }
public void AntesGameAllPlayerNeedsToPutTheSameBlind() { //Arrange var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Antes), new NbPlayersModule(4)).WithAllPlayersSeated(); //Act var res = nfo.Players.All(x => nfo.BlindNeeded(x) == nfo.Game.Table.Params.AnteAmount()); //Assert Assert.AreEqual(true, res, "The game should need the same blind for everybody (Antes)"); }
public void StartGameAndCheckNeededBlindP1AfterP1PutHis() { //Arrange var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).WithAllPlayersSeated(); nfo.PutBlinds(nfo.P1); //Act var res = nfo.BlindNeeded(nfo.P1); //Assert Assert.AreEqual(0, res, "The game should not need a blind from p1 anymore"); }