https://github.com/voidashi/minesweeper-c
minesweeper in te terminal written in c
https://github.com/voidashi/minesweeper-c
Last synced: 30 days ago
JSON representation
minesweeper in te terminal written in c
- Host: GitHub
- URL: https://github.com/voidashi/minesweeper-c
- Owner: voidashi
- License: mit
- Created: 2022-09-19T19:33:18.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-13T20:44:25.000Z (over 1 year ago)
- Last Synced: 2025-11-14T23:41:36.601Z (7 months ago)
- Language: C
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π Minesweeper in C
*A terminal-based implementation of the classic Minesweeper game, built in C.*
[](https://en.wikipedia.org/wiki/C_(programming_language))
[](LICENSE)
---
## π¦ Features
### **Core Gameplay**
- Classic Minesweeper mechanics: Reveal safe squares, avoid mines, and win by clearing the board.
- **Rules:**
- Grid of squares hides mines or safe zones.
- Reveal a mine: Game over.
- Reveal safe squares: Displays adjacent mine count or auto-reveals empty areas.
### **Key Functionality**
- **Multiple Modes:**
1. **Print Board:** Display unaltered board from `boards/` directory.
2. **Hints Mode:** Show boards with adjacent mine counts.
3. **Interactive Play:** Input coordinates to reveal squares dynamically.
- **Terminal-First Design:** Lightweight and runs natively in any UNIX-like environment.
---
## π Getting Started
### **Clone the Repository**
```bash
git clone https://github.com/voidashi/minesweeper-c.git
```
### **Compilation**
Compile with `gcc`:
```bash
gcc -o minesweeper minesweeper.c
```
### **Run the Game**
Start the executable:
```bash
./minesweeper
```
**Note:** Ensure board files are in the `boards/` directory!
---
## πΉοΈ Usage
After launching the game, choose an action:
1. **Print Board** β Load and display a predefined board.
2. **Print Board with Hints** β Add mine-count hints to the board.
3. **User Action** β Enter coordinates interactively to reveal squares.
---
## π€ Contributing
Found a bug or have an idea?
- Open an **Issue** for feature requests or bug reports.
- Submit a **Pull Request** for documented fixes or enhancements.
---
## π License
MIT Licensed - See [LICENSE](LICENSE) for details.
---
*Relive the 90s magicβnow in your terminal!*