stastnypremysl / Mines3D

Minesweeper on n*m*2 matrix for Android.
https://play.google.com/store/apps/details?id=cos.premy.mines&hl=en
GNU General Public License v3.0
15 stars 5 forks source link
android game java minesweeper-style-game

Mines3D

Minesweeper on n*m*2 matrix for Android. The goal of the game is to find all of mines and mark them with a long press. When you double-tap on field without a mine[x, y, z], you will get the number of mines in neighbor fields (if they exist) [(x-1), y, z], [(x+1), y, z], [x, (y-1), z], [x, (y+1), z], [x, y, (z+1) mod 2]. If you double-tap on a field with a mine, the game will end.

There are 5 modes with possible extensions. 1) 5x5x2 with 7 mines 2) 8x8x2 with 16 mines 3) 10x10x2 with 25 mines 4) 12x12x2 with 50 mines 5) 15x15x2 with 90 mines

Installation

<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" alt="Download from Google Play" height="80"> <img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="80">

Screenshots

[]() []() []()

More screenshots can be found in this folder.

Development

Prerequisites

Building and running

Download the repository and open the root folder as a project in Android Studio. Do Grandle sync, and clean and build. After that, you should be able to build it and either run it on your device or VM.

License

This project is licensed under the GPL-3.0 License - see LICENSE.md file for details

Code description

Activities

The MainActivity is the menu, which is shown first. The GameActivity contains a view, of where the game is played.

Static class - LoadedGame

To prevent bugs coming from Android tendencies of endless reinitializations of Activity classes, the game data were moved to the static class LoadedGame. There are no limitations coming from that because only one game can be played at the same time.

There are saved 3 instances of 3 classes: GameStatus, MinesContainer, Activity (the last MainActivity loaded)

Package - cos.premy.mines

You can find here the elemental classes of the program.