Exemplo n.º 1
0
def gameLost():
    score = session['player_score']
    game = Game()
    theme = game.getRandomTheme()
    hint = game.getHint(theme)
    word = game.getWord(theme)
    return jsonify(hint=hint, word=word, score=score)
Exemplo n.º 2
0
def hangman():
    try:
        score = session['player_score']
    except Exception as e:
        return redirect(url_for('index'))
    game = Game();
    theme = game.getRandomTheme();
    hint = game.getHint(theme);
    word = game.getWord(theme);
    return render_template("hangman.html",hint=hint, word=word, score=score)