Android Open Source - RussianTripleForAndroid Bid






From Project

Back to project page RussianTripleForAndroid.

License

The source code is released under:

GNU General Public License

If you think the Android project RussianTripleForAndroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package eu.veldsoft.russian.triple;
/* w w  w  .  j  av  a2 s . co  m*/
class Bid {
  private int score;
  
  private Player player;
  
  public Bid(int score, Player player) {
    super();
    this.score = score;
    this.player = player;
  }

  public int getScore() {
    return score;
  }

  public Player getPlayer() {
    return player;
  }
  
  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 17;
    result = prime * result + ((player == null) ? 0 : player.hashCode());
    result = prime * result + score;
    return result;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    Bid other = (Bid) obj;
    if (player == null) {
      if (other.player != null)
        return false;
    } else if (!player.equals(other.player))
      return false;
    if (score != other.score)
      return false;
    return true;
  }

  @Override
  public String toString() {
    return "Bid [score=" + score + ", player=" + player + "]";
  }
}




Java Source Code List

eu.veldsoft.russian.triple.AIBidder.java
eu.veldsoft.russian.triple.Bid.java
eu.veldsoft.russian.triple.Board.java
eu.veldsoft.russian.triple.Card.java
eu.veldsoft.russian.triple.ComputerPlayer.java
eu.veldsoft.russian.triple.Deck.java
eu.veldsoft.russian.triple.GameActivity.java
eu.veldsoft.russian.triple.HumanPlayer.java
eu.veldsoft.russian.triple.NoTrumpComparator.java
eu.veldsoft.russian.triple.Player.java
eu.veldsoft.russian.triple.State.java
eu.veldsoft.russian.triple.Util.java