public void FinalContract_OneBid()
        {
            var bidding = new Auction(Seat.North);

            bidding.Add(new Bid(1, Denomination.Clubs));
            bidding.Add(Bid.Pass);
            bidding.Add(Bid.Pass);
            bidding.Add(Bid.Pass);
            Assert.AreEqual("1C by North", bidding.FinalContract().ToString());

            bidding = new Auction(Seat.South);
            bidding.Add(Bid.Pass);
            bidding.Add(Bid.Pass);
            bidding.Add(Bid.Pass);
            bidding.Add(new Bid(1, Denomination.Clubs));
            bidding.Add(Bid.Pass);
            bidding.Add(new Bid(2, Denomination.Clubs));
            bidding.Add(Bid.Pass);
            bidding.Add(Bid.Pass);
            bidding.Add(Bid.Pass);
            Assert.AreEqual("2C by East", bidding.FinalContract().ToString());
        }
示例#2
0
 /// <summary>
 ///   Create a new instance of the <see cref="Game"/> class for the
 ///   specified <see cref="Board"/>.
 /// </summary>
 /// <param name="board">
 ///   The <see cref="Makaretu.Bridge.Board"/> used for the duplicate game.
 /// </param>
 public Game(Board board)
 {
     Board = board;
     Bids  = new Auction(board.Dealer);
 }