Fixed minor bugs
parent
64c6773ca9
commit
3341f3e456
1
main.py
1
main.py
|
@ -34,6 +34,7 @@ def move():
|
|||
id = request.get_cookie("gameid", secret=KEY)
|
||||
valid = True
|
||||
if is_submitted("newgame"):
|
||||
del games[id]
|
||||
redirect("/")
|
||||
if is_submitted("prev"):
|
||||
games[id].prev()
|
||||
|
|
|
@ -76,11 +76,13 @@ input[type="text"] {
|
|||
% if not game.endofgame():
|
||||
<input type="text" name="move">
|
||||
<input type="submit" value="Move">
|
||||
% else:
|
||||
<input type="submit" name="newgame" value="New Game">
|
||||
% end
|
||||
</form>
|
||||
|
||||
<form method="post">
|
||||
<input type="submit" name="newgame" value="New Game">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue