Fixed minor bugs

master
Tibor Bizjak 2019-09-11 01:10:53 +02:00
parent 64c6773ca9
commit 3341f3e456
2 changed files with 5 additions and 2 deletions

View File

@ -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()

View File

@ -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>