Package org.gnubridge.core.bidding

Examples of org.gnubridge.core.bidding.Pass


    super(null, null);
  }

  @Override
  protected Bid prepareBid() {
    return new Pass();
  }
View Full Code Here


    SwingUtilities.invokeAndWait(new Runnable() {
      public void run() {
        Deal.setPreInitializedGame(constructGame());
        MainController controller = new MainController();
        controller.getBiddingController().getAuction().bid(new Bid(1, NoTrump.i()));
        controller.getBiddingController().getAuction().bid(new Pass());
        controller.getBiddingController().getAuction().bid(new Pass());
        controller.getBiddingController().getAuction().bid(new Pass());
        controller.getBiddingController().playGame();
      }

    });
View Full Code Here

      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

    if (hand.getSuitLength(Spades.i()) < hand.getSuitLength(Hearts.i())) {
      longer = Hearts.i();
    }
    if (hand.getSuitLength(longer) < 5) {
      if (pc.getHighCardPoints() <= 7) {
        result = new Pass();
      } else if (pc.getHighCardPoints() <= 9) {
        result = new Bid(2, NoTrump.i());
      } else if (pc.getHighCardPoints() <= 14) {
        result = new Bid(3, NoTrump.i());
      }
View Full Code Here

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

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

  }

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

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

  }

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

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

  }

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

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

  }

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

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

  }

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

    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.