'Roobet/stake mines in python
I want to kinda remake mines from roobet.com/stake.com in python. I currently have this:
import random
field = ['','','']
mine = random.randint(0,2)
field[mine] += "mine"
select = int(input('>>> '))
select -= 1
if field[select] == '':
print('Win!')
if field[select] == 'mine':
print('Boom!')```
How it works is lets say theres a 3x3 field and theres a mine randomly place on a cell, I can select cells and if its not a mine it lets me stop any time or continue until I selected all cells -1 and none of them were mines.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
