allow game 0
This commit is contained in:
parent
cf2ed98e38
commit
be964567e6
2
app.py
2
app.py
@ -39,7 +39,7 @@ def init_random_game():
|
|||||||
@app.route('/init/deterministic', methods=['post'])
|
@app.route('/init/deterministic', methods=['post'])
|
||||||
def init_deterministic_game():
|
def init_deterministic_game():
|
||||||
game_id = request.form.get('game_id')
|
game_id = request.form.get('game_id')
|
||||||
if not game_id.isdigit() or not 0 < int(game_id) < NUM_GAMES:
|
if not game_id.isdigit() or not 0 <= int(game_id) < NUM_GAMES:
|
||||||
flash("game_id must be between 0 and {}".format(NUM_GAMES))
|
flash("game_id must be between 0 and {}".format(NUM_GAMES))
|
||||||
return redirect(url_for('home'))
|
return redirect(url_for('home'))
|
||||||
return redirect(url_for('init_deterministic_game_id', game_id=game_id))
|
return redirect(url_for('init_deterministic_game_id', game_id=game_id))
|
||||||
|
Loading…
Reference in New Issue
Block a user