Android Open Source - DroidSweeper Field Status






From Project

Back to project page DroidSweeper.

License

The source code is released under:

MIT License

If you think the Android project DroidSweeper 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 de.nisble.droidsweeper.game.jni;
//from  w  w w. j  a va2s  . c o  m
import de.nisble.droidsweeper.utilities.LogDog;

/** Mapping of msm::FIELDSTATUS
 * <ul>
 * <li>Serializable: Do not change this class!</li>
 * </ul>
 * @author Moritz Nisbl moritz.nisble@gmx.de */
public enum FieldStatus {
  /** Field is hidden (i.e. not clicked). */
  HIDDEN,
  /** Field is revealed. */
  UNHIDDEN,
  /** Field is marked as bomb. */
  MARKED,
  /** Field is marked a queried. */
  QUERIED,
  /** Field is revealed and a bomb -> Game is lost. */
  BOMB;

  private static final String CLASSNAME = FieldStatus.class.getSimpleName();

  /** Transform a integer to its corresponding status value.<br>
   * The status defaults to HIDDEN when the given number is invalid.
   * @param i The value.
   * @return The corresponding status. */
  public static FieldStatus fromInt(int i) {
    FieldStatus temp;
    try {
      temp = values()[i];
    } catch (Exception e) {
      LogDog.e(CLASSNAME, "IndexOutOfBoundsException: " + e.getMessage(), e);
      temp = values()[0];
    }
    return temp;
  }
}




Java Source Code List

de.nisble.droidsweeper.config.ApplicationConfig.java
de.nisble.droidsweeper.config.Constants.java
de.nisble.droidsweeper.config.GameConfig.java
de.nisble.droidsweeper.config.Level.java
de.nisble.droidsweeper.game.Field.java
de.nisble.droidsweeper.game.GameObserver.java
de.nisble.droidsweeper.game.Game.java
de.nisble.droidsweeper.game.Position.java
de.nisble.droidsweeper.game.database.DSDBAdapter.java
de.nisble.droidsweeper.game.database.DSDBContract.java
de.nisble.droidsweeper.game.database.DSDBGameEntry.java
de.nisble.droidsweeper.game.database.DSDBHelper.java
de.nisble.droidsweeper.game.jni.FieldListener.java
de.nisble.droidsweeper.game.jni.FieldStatus.java
de.nisble.droidsweeper.game.jni.GameStatus.java
de.nisble.droidsweeper.game.jni.MatrixObserver.java
de.nisble.droidsweeper.game.jni.MineSweeperMatrix.java
de.nisble.droidsweeper.game.replay.PlayerObserver.java
de.nisble.droidsweeper.game.replay.Player.java
de.nisble.droidsweeper.game.replay.Recorder.java
de.nisble.droidsweeper.game.replay.Replay.java
de.nisble.droidsweeper.game.replay.TimeStep.java
de.nisble.droidsweeper.gui.DroidSweeperActivity.java
de.nisble.droidsweeper.gui.HighScoreActivity.java
de.nisble.droidsweeper.gui.HighScoreListAdapter.java
de.nisble.droidsweeper.gui.SettingsActivity.java
de.nisble.droidsweeper.gui.grid.FieldDrawables.java
de.nisble.droidsweeper.gui.grid.FieldView.java
de.nisble.droidsweeper.gui.grid.GameGridView.java
de.nisble.droidsweeper.utilities.LogDog.java
de.nisble.droidsweeper.utilities.Timer.java