Examples of Auctioneer


Examples of org.gnubridge.core.bidding.Auctioneer

    BiddingRule rule = new Open1NT(a, new Hand("K,2", "A,Q,3", "A,8,6,5,3", "K,J,3"));
    assertEquals(ONE_NOTRUMP, rule.getBid());
  }

  public void testDoNotOpenOneNTWhenResponding() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(ONE_CLUBS);
    a.bid(PASS);
    BiddingRule rule = new Open1NT(a, new Hand("K,2", "A,Q,3", "A,8,6,5,3", "K,J,3"));
    assertEquals(null, rule.getBid());
  }
View Full Code Here

Examples of org.gnubridge.core.bidding.Auctioneer

    BiddingRule rule = new Open1NT(a, new Hand("K,2", "A,Q,3", "A,8,6,5,3", "K,J,3"));
    assertEquals(null, rule.getBid());
  }

  public void testOpeningOneNTSecondCall() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(PASS);
    BiddingRule rule = new Open1NT(a, new Hand("K,2", "A,Q,3", "A,8,6,5,3", "K,J,3"));
    assertEquals(ONE_NOTRUMP, rule.getBid());
  }
View Full Code Here

Examples of org.gnubridge.core.bidding.Auctioneer

    BiddingRule rule = new Open1NT(a, new Hand("K,2", "A,Q,3", "A,8,6,5,3", "K,J,3"));
    assertEquals(ONE_NOTRUMP, rule.getBid());
  }

  public void testCannotOpenOneNTIfInsufficientHCP() {
    Auctioneer a = new Auctioneer(West.i());
    BiddingRule rule = new Open1NT(a, new Hand("K,2", "A,3", "A,8,6,5,3", "K,J,3"));
    assertEquals(null, rule.getBid());
  }
View Full Code Here

Examples of org.gnubridge.core.bidding.Auctioneer

    BiddingRule rule = new Open1NT(a, new Hand("K,2", "A,3", "A,8,6,5,3", "K,J,3"));
    assertEquals(null, rule.getBid());
  }

  public void testDoNotOpenOneNTOnImbalancedHand() {
    Auctioneer a = new Auctioneer(West.i());
    BiddingRule rule = new Open1NT(a, new Hand("K", "A,Q,3", "A,8,6,5,3", "K,J,3,2"));
    assertEquals(null, rule.getBid());
  }
View Full Code Here

Examples of org.gnubridge.core.bidding.Auctioneer

    BiddingRule rule = new Open1NT(a, new Hand("K", "A,Q,3", "A,8,6,5,3", "K,J,3,2"));
    assertEquals(null, rule.getBid());
  }

  public void testCannotOpenOneNTIfHigherBid() {
    Auctioneer a = new Auctioneer(West.i());
    a.bid(new Bid(2, Clubs.i()));
    BiddingRule rule = new Open1NT(a, new Hand("K,2", "A,Q,3", "A,8,6,5,3", "K,J,3"));
    assertEquals(null, rule.getBid());
  }
View Full Code Here

Examples of org.gnubridge.core.bidding.Auctioneer

    BiddingRule rule = new Open1NT(a, new Hand("K,2", "A,Q,3", "A,8,6,5,3", "K,J,3"));
    assertEquals(null, rule.getBid());
  }

  public void testRP1() {
    Auctioneer a = new Auctioneer(West.i());
    BiddingRule rule = new Open1NT(a, RPQuizzes.Basics.Lesson2.hand1());
    assertEquals(ONE_NOTRUMP, rule.getBid());
  }
View Full Code Here

Examples of org.gnubridge.core.bidding.Auctioneer

    BiddingRule rule = new Open1NT(a, RPQuizzes.Basics.Lesson2.hand1());
    assertEquals(ONE_NOTRUMP, rule.getBid());
  }

  public void testRP5() {
    Auctioneer a = new Auctioneer(West.i());
    BiddingRule rule = new Open1NT(a, RPQuizzes.Basics.Lesson2.hand5());
    assertEquals(ONE_NOTRUMP, rule.getBid());
  }
View Full Code Here

Examples of org.gnubridge.core.bidding.Auctioneer

    BiddingRule rule = new Open1NT(a, RPQuizzes.Basics.Lesson2.hand5());
    assertEquals(ONE_NOTRUMP, rule.getBid());
  }

  public void testRP11() {
    Auctioneer a = new Auctioneer(West.i());
    BiddingRule rule = new Open1NT(a, RPQuizzes.Basics.Lesson2.hand11());
    assertEquals(ONE_NOTRUMP, rule.getBid());
  }
View Full Code Here

Examples of org.gnubridge.core.bidding.Auctioneer

public class BiddingAcceptanceTest extends TestCase {
  private static final int TRICKS_PER_DEAL = 6;

  public void testAutomatedBidding() {
    MainController mainController = makeController();
    Auctioneer auction = mainController.getBiddingController().getAuction();
    System.out.println(" ***** Automated bidding on a random game *****");
    mainController.getBiddingController().getCardHolder().printHandsDebug();
    System.out.println("  Initial Calls: " + auction.getCalls());
    int initialBids = auction.getCalls().size();
    mainController.getBiddingController().placeBid(4, "NT");
    System.out.println("  Calls after human bid: " + auction.getCalls());
    assertEquals("Automated bidding was not performed after human placed bid", initialBids + 4, auction.getCalls()
        .size());
  }
View Full Code Here

Examples of org.gnubridge.core.bidding.Auctioneer

  }

  public void testBiddingStochastically() {
    for (int i = 0; i < 100; i++) {
      MainController mainController = makeController();
      Auctioneer auction = mainController.getBiddingController().getAuction();
      System.out.println(" ** ( " + i + " )*** Automated bidding on a random game *****");
      mainController.getBiddingController().getCardHolder().printHandsDebug();
      Hand humanHand = new Hand(mainController.getBiddingController().getHuman().getHand());
      BiddingAgent humanAgent = new BiddingAgent(auction, humanHand);
      System.out.println("  Initial Calls: " + auction.getCalls());

      while (!auction.biddingFinished()) {

        Bid humanBid = humanAgent.getBid();
        System.out.println("  human about to bid: " + humanBid);
        if (new Pass().equals(humanBid)) {
          mainController.getBiddingController().placeBid(-1, "PASS");
        } else {
          mainController.getBiddingController().placeBid(humanBid.getValue(), humanBid.getTrump().toString());
        }
        System.out.println("  Calls after human bid: " + auction.getCalls());
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.