Package org.gnubridge.core.bidding

Examples of org.gnubridge.core.bidding.Pass


  }

  public void test1LevelIsNotAReverseBid() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(new Bid(1, Diamonds.i()));
    a.bid(new Pass());
    a.bid(new Bid(1, Hearts.i()));
    a.bid(new Pass());
    Rebid1ColorWithNewSuit rule = new Rebid1ColorWithNewSuit(a, new Hand("K,Q,J,2", "9,8", "K,Q,J,3,2", "J,2"));
    assertEquals(new Bid(1, Spades.i()), rule.getBid());
  }
View Full Code Here


  }

  public void testNeedAtLeast16ForReverseBid() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(new Bid(1, Diamonds.i()));
    a.bid(new Pass());
    a.bid(new Bid(2, Clubs.i()));
    a.bid(new Pass());
    Rebid1ColorWithNewSuit rule = new Rebid1ColorWithNewSuit(a, new Hand("K,Q,J,2", "9,8", "K,Q,J,3,2", "J,2"));
    assertEquals(null, rule.getBid());
  }
View Full Code Here

  }

  public void testLowerRankedSuitThanOriginalIsNotAReverseBid() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(new Bid(1, Hearts.i()));
    a.bid(new Pass());
    a.bid(new Bid(1, Spades.i()));
    a.bid(new Pass());
    Rebid1ColorWithNewSuit rule = new Rebid1ColorWithNewSuit(a, new Hand("9,8", "K,Q,J,2", "K,Q,J,3,2", "J,2"));
    assertEquals(new Bid(2, Diamonds.i()), rule.getBid());
  }
View Full Code Here

  }

  public void testJumpShiftTo2LevelAt19Points() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(new Bid(1, Clubs.i()));
    a.bid(new Pass());
    a.bid(new Bid(1, Diamonds.i()));
    a.bid(new Pass());
    Rebid1ColorWithNewSuit rule = new Rebid1ColorWithNewSuit(a, new Hand("K,Q,J,2", "A,2", "Q,8", "A,K,5,4,3"));
    assertEquals(new Bid(2, Spades.i()), rule.getBid());
    assertTrue(rule.getBid().isGameForcing());
  }
View Full Code Here

  }

  public void testLowestBidIsAt2LevelDoNotApplyToBalancedHand() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(new Bid(1, Clubs.i()));
    a.bid(new Pass());
    a.bid(new Bid(1, Spades.i()));
    a.bid(new Pass());
    Rebid1ColorWithNewSuit rule = new Rebid1ColorWithNewSuit(a, new Hand("3,2", "K,Q,J,2", "9,8,3", "A,K,5,4"));
    assertEquals(null, rule.getBid());
  }
View Full Code Here

public class Respond1ColorRaiseMinorSuitTest extends TestCase {
  public void testOnlyAppliesToMinorSuit() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(new Bid(1, Hearts.i()));
    a.bid(new Pass());
    Respond1ColorRaiseMinorSuit rule = new Respond1ColorRaiseMinorSuit(a, new Hand("K,3,2", "5,4,3", "K,9,8,6",
        "5,4,3"));

    assertEquals(null, rule.getBid());
  }
View Full Code Here

  }

  public void testOnlyAppliesToPartnersBidAt1Level() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(new Bid(2, Diamonds.i()));
    a.bid(new Pass());
    Respond1ColorRaiseMinorSuit rule = new Respond1ColorRaiseMinorSuit(a, new Hand("K,3,2", "5,4,3", "K,9,8,6",
        "5,4,3"));

    assertEquals(null, rule.getBid());
  }
View Full Code Here

  }

  public void testRaiseThePartnerBy1() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(new Bid(1, Diamonds.i()));
    a.bid(new Pass());
    Respond1ColorRaiseMinorSuit rule = new Respond1ColorRaiseMinorSuit(a, new Hand("K,3,2", "10,5,4", "K,8,6,5",
        "5,4,3"));

    assertEquals(new Bid(2, Diamonds.i()), rule.getBid());
  }
View Full Code Here

  }

  public void testRaiseThePartnerBy1AlsoOnClubs() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(new Bid(1, Clubs.i()));
    a.bid(new Pass());
    Respond1ColorRaiseMinorSuit rule = new Respond1ColorRaiseMinorSuit(a, new Hand("K,3,2", "10,5,4", "8,6,5",
        "K,5,4,3"));

    assertEquals(new Bid(2, Clubs.i()), rule.getBid());
  }
View Full Code Here

  }

  public void testDoNotApplyIfLessThan6Points() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(new Bid(1, Diamonds.i()));
    a.bid(new Pass());
    Respond1ColorRaiseMinorSuit rule = new Respond1ColorRaiseMinorSuit(a, new Hand("K,3,2", "9,5,4", "9,8,6,5",
        "5,4,3"));

    assertEquals(null, rule.getBid());
  }
View Full Code Here

TOP

Related Classes of org.gnubridge.core.bidding.Pass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.