コード例 #1
0
        public void CanBlackWin()
        {
            Field field = new Field(1, 1);
            var   game  = new RouletteGame.Legacy.RouletteGame(new FakeRoulette(field));

            game.OpenBets();
            Bet bet = new ColorBet("Fake Player", 100, 1);

            game.PlaceBet(bet);
            game.CloseBets();
            game.SpinRoulette();
            game.PayUp();
            Assert.That(game.FakePayUp(bet).Equals(bet.WonAmount(field)));
        }
コード例 #2
0
 public void CanAllFieldWin()
 {
     for (uint i = 0; i < 37; i++)
     {
         Field field = new Field(i, 0);
         var   game  = new RouletteGame.Legacy.RouletteGame(new FakeRoulette(field));
         game.OpenBets();
         Bet bet = new FieldBet("Fake Player", 100, i);
         game.PlaceBet(bet);
         game.CloseBets();
         game.SpinRoulette();
         game.PayUp();
         Assert.That(game.FakePayUp(bet).Equals(bet.WonAmount(field)));
     }
 }