https://github.com/asmundstavdahl/minesweeper
Crystal implementation of the game minesweeper.
https://github.com/asmundstavdahl/minesweeper
crystal game minesweeper
Last synced: 7 months ago
JSON representation
Crystal implementation of the game minesweeper.
- Host: GitHub
- URL: https://github.com/asmundstavdahl/minesweeper
- Owner: asmundstavdahl
- Created: 2019-10-17T13:36:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-18T10:51:32.000Z (about 5 years ago)
- Last Synced: 2025-07-06T10:12:00.066Z (9 months ago)
- Topics: crystal, game, minesweeper
- Language: Crystal
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# minesweeper-cr
A crystal implementation og minesweeper.
## Usage
`crystal build src/main.cr && ./main`
See `src/input.cr` for all available commands.
## Example
```
>> crystal build src/main.cr && bombs=10 cols=8 rows=8 ./main
0 1 2 3 4 5 6 7
0 · · · · · · · ·
1 · · · · · · · ·
2 · · · · · · · ·
3 · · · · · · · ·
4 · · · · · · · ·
5 · · · · · · · ·
6 · · · · · · · ·
7 · · · · · · · ·
0/64 0/10 » 0 2
Show(@x=0, @y=2)
0 1 2 3 4 5 6 7
0 · · · · 1 · · ·
1 · 1 1 1 1 · · ·
2 · 1 · · · · · ·
3 · 1 · · · · · ·
4 1 1 · · · · · ·
5 · · · · · · · ·
6 · · · · · · · ·
7 · · · · · · · ·
16/64 0/10 » 3 3
Show(@x=3, @y=3)
0 1 2 3 4 5 6 7
0 · · · · 1 💣 1 ·
1 · 1 1 1 1 1 1 ·
2 · 1 💣 2 1 · · ·
3 · 1 3 💥 3 1 1 ·
4 1 1 3 💣 4 💣 1 ·
5 💣 2 3 💣 4 2 2 ·
6 2 💣 2 1 3 💣 2 ·
7 1 1 1 · 2 💣 2 ·
Game over.
```