Package org.gnubridge.core.bidding

Examples of org.gnubridge.core.bidding.Auctioneer


    assertEquals(null, rule.getBid());
  }

  public void testCanHandlePartnersPassWithoutNPE() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(PASS);
    a.bid(PASS);
    Respond1ColorRaiseMajorSuit rule = new Respond1ColorRaiseMajorSuit(a, new Hand("K,3,2", "K,5,4", "A,8,6,5",
        "A,K,3"));

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


import org.gnubridge.core.deck.NoTrump;
import org.gnubridge.core.deck.Spades;

public class RebidOriginalSuitTest extends TestCase {
  public void testRebidAt2Level() {
    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());
    Rebid1ColorOriginalSuit rule = new Rebid1ColorOriginalSuit(a, new Hand("3,2", "K,Q,J", "9,8", "A,K,5,4,3,2"));
    assertEquals(new Bid(2, Clubs.i()), rule.getBid());
  }
View Full Code Here

    Rebid1ColorOriginalSuit rule = new Rebid1ColorOriginalSuit(a, new Hand("3,2", "K,Q,J", "9,8", "A,K,5,4,3,2"));
    assertEquals(new Bid(2, Clubs.i()), rule.getBid());
  }

  public void testRebidAt3Level() {
    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());
    Rebid1ColorOriginalSuit rule = new Rebid1ColorOriginalSuit(a, new Hand("3,2", "A,K,5,4,3,2", "K,Q,J", "K,8"));
    assertEquals(new Bid(3, Hearts.i()), rule.getBid());
  }
View Full Code Here

    Rebid1ColorOriginalSuit rule = new Rebid1ColorOriginalSuit(a, new Hand("3,2", "A,K,5,4,3,2", "K,Q,J", "K,8"));
    assertEquals(new Bid(3, Hearts.i()), rule.getBid());
  }

  public void testRebidAt4Level() {
    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());
    Rebid1ColorOriginalSuit rule = new Rebid1ColorOriginalSuit(a, new Hand("K,2", "A,K,J,5,4,3,2", "K,Q", "K,8"));
    assertEquals(new Bid(4, Hearts.i()), rule.getBid());
  }
View Full Code Here

    Rebid1ColorOriginalSuit rule = new Rebid1ColorOriginalSuit(a, new Hand("K,2", "A,K,J,5,4,3,2", "K,Q", "K,8"));
    assertEquals(new Bid(4, Hearts.i()), rule.getBid());
  }

  public void testDoNotRebidIfLessThan6Cards() {
    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());
    Rebid1ColorOriginalSuit rule = new Rebid1ColorOriginalSuit(a, new Hand("3,2", "K,Q,J", "9,8,2", "A,K,5,4,3"));
    assertEquals(null, rule.getBid());
  }
View Full Code Here

    Rebid1ColorOriginalSuit rule = new Rebid1ColorOriginalSuit(a, new Hand("3,2", "K,Q,J", "9,8,2", "A,K,5,4,3"));
    assertEquals(null, rule.getBid());
  }

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

import org.gnubridge.core.bidding.Pass;
import org.gnubridge.core.deck.NoTrump;

public class BiddingRuleTest extends TestCase {
  public void testDoNotBidIfSubclassRecommendsBidBelowCurrentHigh() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(new Bid(2, NoTrump.i()));
    BiddingRule always1NT = new BiddingRule(a, null) {
      protected Bid prepareBid() {
        return new Bid(1, NoTrump.i());
      }
View Full Code Here

public class TakeoutDoubleTest extends TestCase {
  private Auctioneer auctioneer;
  private TakeoutDouble rule;

  private void givenNoPriorBids() {
    auctioneer = new Auctioneer(WEST);

  }
View Full Code Here

import org.gnubridge.core.deck.Hearts;
import org.gnubridge.core.deck.Spades;

public class Rebid1ColorWithNewSuitTest extends TestCase {
  public void testShowUnbidSuitAt1Level() {
    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("3,2", "K,Q,J,2", "9,8", "A,K,5,4,3"));
    assertEquals(new Bid(1, Hearts.i()), rule.getBid());
  }
View Full Code Here

    Rebid1ColorWithNewSuit rule = new Rebid1ColorWithNewSuit(a, new Hand("3,2", "K,Q,J,2", "9,8", "A,K,5,4,3"));
    assertEquals(new Bid(1, Hearts.i()), rule.getBid());
  }

  public void testNoUnbidSuitWith4Cards() {
    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("3,2", "9,8", "K,Q,J,2", "A,K,5,4,3"));
    assertEquals(null, rule.getBid());
  }
View Full Code Here

TOP

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

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.