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