This is a simple implementation of the classic Minesweeper game written in Ruby, using the Gosu graphics library for a graphical user interface (GUI). It features a grid of cells, where some cells contain bombs. The player needs to uncover all the cells that do not contain bombs while avoiding the bombs.
- Minesweeper Gameplay: Classic gameplay where players reveal cells and flag bombs.
- Gosu Graphics: The game uses the Gosu library to handle window creation, graphics rendering, and input events.
- Cell States: Cells can have different states such as uncovered or covered.
- Bombs: The game generates a random number of bombs and places them in cells.
- Hints: Cells show numbers to indicate how many bombs are adjacent to them.
- Game Over: The game ends when the player clicks a bomb.
To run this game, you need:
- Docker
- xHost
To run the game do:
xhost +local:docker
docker build -t minesweeper .
docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix minesweeper:latest
- Flagged Cell States: Add flagged status to cells.
- Play Again Option: Add restart option after game ends.
- Difficulty Options: Add different difficulties.
- Automatic Clean Cells Discovery: After pressing on any of the empty cells discover adjacent ones to speed up the game.