Android Open Source - TokenTracker Randomizer






From Project

Back to project page TokenTracker.

License

The source code is released under:

GNU General Public License

If you think the Android project TokenTracker 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 com.ekflagristoj.tokentracker.util;
//from w w w  .  j a va 2s  .  com
import java.util.Random;

public class Randomizer {

  private Random randomizer;
  
  public String flipCoin() {
    return ( ( randomizer.nextInt(2) == 1 ) ? "h" : "t" );
  }
  public int rollDie( int faces ) {
    return ( randomizer.nextInt( faces ) + 1 );
  }
  public Randomizer() {
    this.randomizer = new Random();
  }
}




Java Source Code List

com.ekflagristoj.tokentracker.CreatePlayerActivity.java
com.ekflagristoj.tokentracker.CreateTokenActivity.java
com.ekflagristoj.tokentracker.MainActivity.java
com.ekflagristoj.tokentracker.RandomizerActivity.java
com.ekflagristoj.tokentracker.SpawnTokenActivity.java
com.ekflagristoj.tokentracker.util.Card.java
com.ekflagristoj.tokentracker.util.DatabaseHelper.java
com.ekflagristoj.tokentracker.util.Player.java
com.ekflagristoj.tokentracker.util.Randomizer.java
com.ekflagristoj.tokentracker.util.TokenDataSource.java
com.ekflagristoj.tokentracker.util.Token.java