Android Open Source - DroidSweeper Time Step






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.replay;
/*  w w w.  ja  va  2 s  . c  o  m*/
import java.io.Serializable;

import de.nisble.droidsweeper.game.Field;
import de.nisble.droidsweeper.game.jni.FieldStatus;
import de.nisble.droidsweeper.game.jni.GameStatus;

/** This class holds changes of field states that occur during one
 * time step (typically one click).
 * <ul>
 * <li>Immutable: Members are public final and capitalized.</li>
 * <li>Serializable: Do not change this class!</li>
 * </ul>
 * @author Moritz Nisbl moritz.nisble@gmx.de
 * @see {@link Replay} for a detailed explanation of how a replay is structured.
 * @see {@link Recorder} for an explanation of how a replay is recorded. */
public final class TimeStep implements Serializable {
  private static final long serialVersionUID = 1L;

  /** The play time of this step in milliseconds. */
  public final long TIME;
  /** An integer corresponding to the current {@link GameStatus}. */
  public final int GAMESTATUS;
  /** The count of remaining bombs. */
  public final int BOMBS;
  /** An array of all {@link Field fields} that have changed its
   * {@link FieldStatus state} during the time step. */
  public final Field[] STEPS;

  /** Create a new step.
   * @param time The current play time.
   * @param gameStatus The {@link GameStatus}.
   * @param remainingBombs The count of remaining bombs.
   * @param steps An array of all {@link Field} that have changed its state. */
  public TimeStep(long time, int gameStatus, int remainingBombs, Field[] steps) {
    TIME = time;
    GAMESTATUS = gameStatus;
    BOMBS = remainingBombs;
    STEPS = steps;
  }
}




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