Package org.gnubridge.core.bidding

Examples of org.gnubridge.core.bidding.Auctioneer


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


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

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

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

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

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

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

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

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

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

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

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

public class RebidTest extends TestCase {
  public void testOnlyApplyToRebids() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(ONE_HEARTS);
    a.bid(PASS);
    Rebid rule = new Rebid(a, new Hand("3,2", "K,Q,J,2", "9,8", "A,K,5,4,3")) {
      @Override
      protected Bid prepareBid() {
        throw new RuntimeException("should not try to prepare bid when it's not a rebid situation");
      }
View Full Code Here

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

  public void testPrepareBidInRebidSituation() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(ONE_CLUBS);
    a.bid(PASS);
    a.bid(ONE_DIAMONDS);
    a.bid(PASS);

    Rebid rule = new Rebid(a, new Hand("3,2", "K,Q,J,2", "9,8", "A,K,5,4,3")) {
      @Override
      protected Bid prepareBid() {
        return new Bid(7, NoTrump.i());
View Full Code Here

    };
    assertEquals(new Bid(7, NoTrump.i()), rule.getBid());
  }

  public void testPrepareBidInRebidSituationOpponent1Doubles() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(ONE_CLUBS);
    a.bid(DOUBLE);
    a.bid(ONE_DIAMONDS);
    a.bid(PASS);

    Rebid rule = new Rebid(a, new Hand("3,2", "K,Q,J,2", "9,8", "A,K,5,4,3")) {
      @Override
      protected Bid prepareBid() {
        return new Bid(7, NoTrump.i());
View Full Code Here

    };
    assertEquals(new Bid(7, NoTrump.i()), rule.getBid());
  }

  public void testPrepareBidInRebidSituationOpponent2Doubles() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(ONE_CLUBS);
    a.bid(PASS);
    a.bid(ONE_DIAMONDS);
    a.bid(DOUBLE);

    Rebid rule = new Rebid(a, new Hand("3,2", "K,Q,J,2", "9,8", "A,K,5,4,3")) {
      @Override
      protected Bid prepareBid() {
        return new Bid(7, NoTrump.i());
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.