Giter VIP home page Giter VIP logo

mines3d's Introduction

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

Download from Google Play Get it on F-Droid

Screenshots

More screenshots can be found in this folder.

Development

Prerequisites

  • Android Studio 2023.1.1
  • A device with Android newer than 4.4

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.

  • LoadedGame - ...
  • MyHappyException - Exception class for throwing exceptions specific to this program
  • Utils - Any generally useful code
  • MainActivity - An activity class, that defines the modes of the game
  • GameStatus - The status of the running game. (things like the time of a start)

Package - cos.premy.mines.graphics

  • GameActivity - An activity class, which runs a game view
  • IDrawable - Interface, which is implemented by all of the game components
  • MinesView - The view in GameActivity, in which are initialized, drawn, updated,... all of IDrawable
  • Grid - It draws the grid and sends commands to mine fields.
  • MineField - It draws one of mines. One instance is always paired with only one mine and with one MineField[x][y][(z+1)mod 1].
  • MinesLayoutComputor - Stuff like the margin of the grid, size of the grid,...
  • StatusLabel - The text in the left corner.
  • SwitchButton - The button, which switches the level(z) of the grid.

Package - cos.premy.mines.graphics.animations

It takes care of animations in the program. It is easily understandable from the code.

Package - cos.premy.mines.generator

  • MinesGenerator - Interface for problem generator
  • RandomMinesGenerator - The actual generator of all problems.

Package - cos.premy.mines.data

  • Mine - the container for storing information about one mine
  • MinesContainer - the container for storing Mine

mines3d's People

Contributors

fontan030 avatar stastnypremysl avatar translucentsabre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mines3d's Issues

Improve the README.md file for the application download section

Hi, Good job on the project ๐Ÿ˜Ž ๐Ÿ‘

Maybe someone try improving the README.md file in the section with the links to download the application.

With Google Play Store and F-Droid badges

Here is an example that can be done, which exists on the majority of Mobile Development projects on Github.

Custom_readme

pause

please could this puzzle game pause when it loses focus?

it takes a very long time to play, especially the larger level. when a phonecall interrupts play or something else needs attention, the timer doesn't stop, and sometimes the map is lost.

Improvements for the "end message"

Hey, could we get a new message for games we won? Every other time I'm frustrated to see "Game over" only to realize that I haven't lost. At least for me the term "game over" has an intrinsic negative connotation.

Furthermore, I would appreciate if you formatted the quadruple that represents your progress in a different way. Perhaps one number per line like in

Correct mines: x
placed mines: y
opened fields: z
no of mines: w

Ideally with the colons or the numbers aligned (to the right).

Also, at least for the end message, could we have a conversion of the time to something more readable? At least minutes, please. Not sure if anyone stays in a level for more than an hour, so minutes realistically should be sufficient for most use cases.

Lastly, is there a possibility to display the message over the game? Perhaps even in a way that I can investigate my mistake in case I lost? So, make the game immutable (no more inputs to change the grids), but let me still switch between the layers and perhaps you could even highlight my mistakes somehow.

Winnable Levels?

I know a lot of Minesweeper-like games and yours is definitely a nice spin on the base idea. The last day or two I'm close to addicted to this game. ;)

But what neither Microsoft's version nor most of the clones do, is ensuring that the game is actually solvable by pure deduction. In other words, after I started the level by guessing some random cell (), I want to be able to progress without ever having to guess again. This would even expand on the issue #5 in the way that the first cell would always have to be a blank cell, otherwise your second tap already would always be another guess. () So, an enjoyable minesweeper (to me) will never be down to guessing especially when the first tap will never make you lose and each subsequent tab is predictable (given you did enough thinking).

I know that this was done before (see here), but I'm aware that this isn't trivial. Hence, I would really appreciate if you tried but I like the game very much in its current state already. And if this is too much to ask, I left some minor tickets as well, to improve more on the mundane problems I have with your game. But definitely keep up the good work! From time to time I look for new games to play and whenever this search results in me installing a great game like this one, I feel deeply happy!

Win detection

In general I don't mind this in my everyday matches I play, but from a purely logical standpoint, recognizing a level as solved just because the player marked all and only the correct spots isn't really correct. Because given enough endurance a player could win a match without revealing any cells and by just guessing every possible mine pattern. A logical approach would be to count a level as solved, if all non-mine cells are correctly revealed (regardless of how many mine-markers were placed). If you want to use your approach, I would at least add a button to the UI. This button would become clickable as soon as you marked the required number of mines and effectively would try to reveal all the remaining non-marked cells. If your guess was right, you win, if you mis-placed a marker and the button would reveal a mine, you lose.

I would even go as far as to say, that this isn't even something that the user should be able to configure in the settings. As I said, your current approach isn't problematic most of the times, but it's a hack! And all the other settings don't offer hacks, just themes (BW/color, lines/numbers), difficulty (easy/hard( and usability features (auto/manual flood).

Still, right now that levels aren't strictly solvable by deduction, I can see some value in this approach because you can at least try some mine-patterns if you would have to guess near the end of a level. But again, this is a hack and not a valid strategy.

Crowdsourced localization ?

Hi ๐Ÿ‘‹

I'm a player from france and i'd like to provide french translations for the parts of the app that need it. I'm thinking of the app description on the Fdroid store, menu strings etcโ€ฆ
I believe it would help spread the word about your game and make it known to others :)

If you seriously consider it, i recommend you go with a hosted translation tool like Weblate (which is FOSS and provides free hosting for FOSS projects), because it helps a lot with people like me who are not at ease with code and modifying files. ๐Ÿ‘

Unified color-scheme

I really much appreciate that the actual game either adapts to me choice of a dark color scheme on my device or just uses black by choice, but the main menu is light which isn't really for me. Would you mind adding a general color scheme setting? Just Dark/Light would be enough for me. If you want to be extra fancy Dark/Light/System, or add any other color schemes you like on top... ;)

Automatic floodfill

Nice game, I really like the style, the only problem I have with it is that you have to floodfill by hand, which is kind of tedious, so it would be nice to have an option for it to be automatic.

Shakey hands accessibility

I really like this game but it can be hard to play sometimes. With shaking hands it can be easy to double tap things. Having an accessibility mode where you select the tile and then hit a button elsewhere (or something similar) would make double taps much harder.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.