generated from mwc/project_game
30 lines
486 B
Python
30 lines
486 B
Python
|
|
|
|
MAX_MINES = 50
|
|
LEVELS = [
|
|
[5, 10],
|
|
[10, 20],
|
|
[15, 30],
|
|
[100, 40]
|
|
]
|
|
|
|
def mine_counter(state):
|
|
current_score = state['Score']
|
|
for limit, n in LEVELS:
|
|
if current_score < limit:
|
|
return n
|
|
return MAX_MINES
|
|
|
|
'''
|
|
if score < 5:
|
|
num_mines = 10
|
|
if 10 <= score <50:
|
|
num_mines = 20
|
|
if 50 <= score <75:
|
|
num_mines = 30
|
|
if 75 <= score <100:
|
|
num_mines = 40
|
|
#else:
|
|
#num_mines = 50
|
|
return num_mines
|
|
''' |