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)
|
id = request.get_cookie("gameid", secret=KEY)
|
||||||
valid = True
|
valid = True
|
||||||
if is_submitted("newgame"):
|
if is_submitted("newgame"):
|
||||||
|
del games[id]
|
||||||
redirect("/")
|
redirect("/")
|
||||||
if is_submitted("prev"):
|
if is_submitted("prev"):
|
||||||
games[id].prev()
|
games[id].prev()
|
||||||
|
|
|
@ -76,11 +76,13 @@ input[type="text"] {
|
||||||
% if not game.endofgame():
|
% if not game.endofgame():
|
||||||
<input type="text" name="move">
|
<input type="text" name="move">
|
||||||
<input type="submit" value="Move">
|
<input type="submit" value="Move">
|
||||||
% else:
|
|
||||||
<input type="submit" name="newgame" value="New Game">
|
|
||||||
% end
|
% end
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
<input type="submit" name="newgame" value="New Game">
|
||||||
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue