Android Open Source - RussianTripleForAndroid Computer Player






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  a v a  2 s .  c om*/
public class ComputerPlayer extends Player implements AIBidder {

  public ComputerPlayer(String name) {
    super(name);
  }

  @Override
  public boolean canDoBid(int currentValue) {
    // TODO
    return false;
  }

  @Override
  public Bid doBid(int currentValue) {
    Bid bid = null;
    
    //TODO 
    if(Util.PRNG.nextDouble() < 0.95) {
      bid = new Bid(currentValue+1, this);
    } else {
      bid = new Bid(0, this);
    }
    
    return bid;
  }

}




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