Android Open Source - android-simlple-minefield App Contract






From Project

Back to project page android-simlple-minefield.

License

The source code is released under:

Apache License

If you think the Android project android-simlple-minefield 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.trabo.minefield.utils;
/*from   w w  w  .j  av  a  2s.  co  m*/
/**
 * @author Andriy Petruk <andrii.petruk{at}gmail.com>
 * @date 23.06.14.
 */
public interface AppContract {
    String HIGH_SCORE_PREFS = "high_score_data";
    String SETTINGS_PREFS = "settings_data";
    String TIME_FORMAT = "%d:%02d:%d";
    String UNMARKED_FORMAT = "%03d";
    String VIBRATION_KEY = "vibration_key";

    enum GameType {
        EASY(8, 8, 10), NORMAL(10, 12, 15), HARD(10, 14, 20);

        private final int mWidth;
        private final int mHeight;
        private final int mNumMines;

        GameType(int width, int height, int numMines) {
            mWidth = width;
            mHeight = height;
            mNumMines = numMines;
        }

        public int getWidth() {
            return mWidth;
        }

        public int getHeight() {
            return mHeight;
        }

        public int getNumMines() {
            return mNumMines;
        }
    }
}




Java Source Code List

com.trabo.minefield.CellOnTouchListener.java
com.trabo.minefield.GameActivity.java
com.trabo.minefield.HighScoresActivity.java
com.trabo.minefield.MainActivity.java
com.trabo.minefield.MineFieldListener.java
com.trabo.minefield.MineModel.java
com.trabo.minefield.MinefieldAdapter.java
com.trabo.minefield.MinefieldView.java
com.trabo.minefield.utils.AppContract.java
com.trabo.minefield.utils.AppUtils.java
com.trabo.minefield.utils.MineGridUtils.java