Make rows, cols and mines customizable with flags

This commit is contained in:
2025-03-16 23:01:14 +01:00
parent 8fe6b9752e
commit 8b8c20fb74
2 changed files with 39 additions and 3 deletions
+10
View File
@@ -37,6 +37,16 @@ Simply run:
go run main.go
```
You can customize the game with command line flags:
```
go run main.go -rows=15 -cols=20 -mines=30
```
Available options:
- `-rows`: Number of rows (default: 10, minimum: 5)
- `-cols`: Number of columns (default: 10, minimum: 5)
- `-mines`: Number of mines (default: 10, maximum: 1/3 of total cells)
## How to Play
- Left-click: Open a cell