Package com.svanloon.game.wizard.client.player

Examples of com.svanloon.game.wizard.client.player.Opponent


    return hand.iterator().next();
  }

  private int desireToTakeTrick() {
    Opponent opponent = os.findOpponent(id);
    int needed = Math.max(opponent.getNumberOfTricksNeeded(), 0);
    int round = opponent.getRound() + 1;
    int remaining = opponent.getCardsRemaining();
    if(false) {
      _logger.info(id + "[need "+needed+"], [round "+round+"], [remaining "+remaining+"]");
    }
    return needed*(round-remaining);

 
View Full Code Here


   *
   * @param id
   * @param bid
   */
  public void setBid(int id, int bid) {
    Opponent opponent = findOpponent(id);
    opponent.setBid(bid);
    update();
  }
View Full Code Here

   */
  public void played(int id, Card played) {
    setLead(played);
    setHighCard(played);

    Opponent opponent = findOpponent(id);
    opponent.setPlayedTrick(true);
    opponent.setCardsRemaining(opponent.getCardsRemaining() - 1);
    opponent.played(lead, highCard, played);
   
    update();
  }
View Full Code Here

   * Document the wonTrick method
   *
   * @param id
   */
  public void wonTrick(int id) {
    Opponent opponent = findOpponent(id);
    opponent.tookTrick();
  }
View Full Code Here

   *
   * @param id
   * @param scoreChangeAmount
   */
  public void changeScore(int id, int scoreChangeAmount) {
    Opponent opponent = findOpponent(id);
    opponent.changeScore(scoreChangeAmount);
    update();
  }
View Full Code Here

    List<Opponent> opponents = new ArrayList<Opponent>();
   
    for(int i = 0; i < e.getPlayerNames().size(); i++) {
      int tempId = e.getIds().get(i).intValue();
      String playerName = e.getPlayerNames().get(i);
      Opponent opponent = new Opponent(tempId, playerName);
      opponents.add(opponent);
    }
    opponentSummary.setOpponent(opponents);
  }
View Full Code Here

TOP

Related Classes of com.svanloon.game.wizard.client.player.Opponent

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.