Android Open Source - android-simlple-minefield App Utils






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;
//  w  w w .  j  a  va2s . com
/**
 * @author Andriy Petruk <andrii.petruk{at}gmail.com>
 * @date 23.06.14.
 */
public final class AppUtils {
    private static final String TIME_FORMAT = "%d:%02d:%d";

    //TODO: replace with Date format
    public static String getTimeString(long timeInMillis) {
        int millis = (int) (timeInMillis % 1000);
        int seconds = (int) (timeInMillis / 1000);
        int minutes = seconds / 60;
        seconds = seconds % 60;
        return String.format(TIME_FORMAT, minutes, seconds, millis / 100);
    }
}




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