Android Open Source - FindtheMines Board Size






From Project

Back to project page FindtheMines.

License

The source code is released under:

MIT License

If you think the Android project FindtheMines 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 findtheminecore;
/*from  www. ja  v a  2s.c om*/
public enum BoardSize {
  SMALL(4,6,"small",2),
  STANDARD(8,8,"standard",10),
  LARGE(12,16,"large",20),
  HUGE(20,30,"huge",30), 
  SUPER_SMALL(2,3,"super small",1),
  ONE(1,1,"one",0);
  
    private final int noOfCols;  
    private final int noOfRows;
    private final String string;
  private int randomValue;
  
  
    BoardSize(int noOfRows,int noOfCols,String string,int randomValue) {
        this.noOfCols = noOfCols;
        this.noOfRows = noOfRows;
        this.string = string;
        this.randomValue = randomValue;
    }
    BoardSize(int noOfRows,int noOfCols,String string) {
      this(noOfRows, noOfCols, string,noOfRows+noOfCols);
    }
  public int noOfRows() {
    return this.noOfRows;
  }
  public int noOfCols() {
    return this.noOfCols;
  }
  public int size() {
    return noOfCols*noOfRows;
  }
  public String toString(){
    return string;
  }
  public static BoardSize get(String string) {
    if (string=="small"){
      return BoardSize.SMALL;
    } else if (string=="large"){
      return BoardSize.LARGE;
    }else if(string=="huge"){
      return BoardSize.HUGE;
    }else if (string=="one"){
      return BoardSize.ONE;
    }else{
      return BoardSize.STANDARD;
    }
    
  }
  public int getRandomValue() {
    return randomValue;
  }
  
}




Java Source Code List

com.stealthness.findthemines.ImageAdapter.java
com.stealthness.findthemines.MainActivity.java
com.stealthness.findthemines.SplashScreen.java
findtheminecore.BoardSize.java
findtheminecore.Board.java
findtheminecore.Game.java
findtheminecore.Position.java
findtheminecore.RuleSet.java
findtheminecore.TileType.java
findtheminecore.Tile.java