コード例 #1
0
ファイル: app.py プロジェクト: chaitraligharat/Hangman
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)
コード例 #2
0
ファイル: app.py プロジェクト: chaitraligharat/Hangman
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)