Skip to content

Commit c0cbd92

Browse files
author
Sai Rahul
authored
Created a small game
1 parent 479bf38 commit c0cbd92

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Minesweeper/Sai3Rahul.md/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# minesweeper
2+
3+
This is a Python implementation of 2-D Minesweeper!
4+
5+
You start a game by running the script:
6+
```
7+
python3 minesweeper.py
8+
```
9+
(If you do not edit the parameters in the script, the script will automatically initialize it to a 10x10 board, with 10 bombs)
10+
11+
Note that the inputs must be that the number of bombs is less than the total number of spaces (n^2).
12+
13+
For now, this script does not have a GUI and you can use terminal :D (If you want to make a GUI, feel free to make a pull request)
14+
15+
In order to "dig" at a certain location, you type in the index of the row, then the column, separated by a comma (whitespace optional). The game "digs" recursively around that location if there are no bombs nearby.
16+
17+
You can continue digging until either you hit a bomb (which is game over) or you've successfully dug up all n-b non-bomb locations (which is victory)!
18+
19+
![Screenshot 2022-10-02 133600](https://user-images.githubusercontent.com/104320194/193444718-59c460c7-de14-4c3c-af3e-e0a9735bafc9.jpeg)
20+
![Screenshot 2022-10-02 133612](https://user-images.githubusercontent.com/104320194/193444725-59b7bac0-3be2-43f3-b612-f619d2edd0c3.jpeg)

0 commit comments

Comments
 (0)