diff --git a/flask/testapp/static/javascript/resultScreen.js b/flask/testapp/static/javascript/resultScreen.js index fe245fb..07df5e1 100644 --- a/flask/testapp/static/javascript/resultScreen.js +++ b/flask/testapp/static/javascript/resultScreen.js @@ -140,15 +140,15 @@ setAlp(100); if(language==JPN){ fText("美人投票ゲーム", 480, 100, 80, "white"); - fText("参加予定者:" + max_player + "人", 480, 300, 50, "black"); + fText("最大参加人数:" + max_player + "人", 480, 300, 50, "black"); fText("現在の参加者:" + current_player + "人", 480, 400, 50, "black"); fText("参加者が揃うまでお待ちください...", 480, 500, 50, "red"); fTextN("ルール説明\n\n・好きな選択肢を選んでください\n・選んだ選択肢が多数派なら高得点GET!\n・制限時間は30秒\n・途中参加、途中退出は不可", 480, 950, 250, 40, "black"); } else{ fText("Beauty Vote", 480, 100, 80, "white"); - fText("Prospective Participant : " + max_player + " players", 480, 300, 50, "black"); - fText("Current Participant : " + current_player + " players", 480, 400, 50, "black"); + fText("Max Participants : " + max_player + " players", 480, 300, 50, "black"); + fText("Current Participants : " + current_player + " players", 480, 400, 50, "black"); fTextN("Please Wait until\n All Participants are Present...", 480, 500, 50, 50, "red"); fTextN("Rule Explanation\n\n・Please choose your favorite option\n・If the chosen option is the majority,\nyou get high points!\n・The time limit is 30 seconds\n・No mid-term participation or withdrawal", 480, 950, 230, 35, "black"); } diff --git a/flask/testapp/views.py b/flask/testapp/views.py index c2b2bf2..20d33f7 100644 --- a/flask/testapp/views.py +++ b/flask/testapp/views.py @@ -7,7 +7,7 @@ user_score = {} # playerの数 -MAX_PLAYER = 30 +MAX_PLAYER = 50 WAIT_TIME = 40 @@ -108,7 +108,6 @@ choices.append(request.form.get("choice")) print(f"Received choice:{choices} Round:{current_round+1}") else: - print("GET FAIL") return "FAILED" # 他の人が終わるまで待機 @@ -153,6 +152,14 @@ # 最終結果を集計 if request.form.get("checkResult"): + end = time.time() + print(f"TIME: {end-start}") + if end - start > WAIT_TIME: + scores_order, user_number_order = calculate_order(data) + order_table_array = create_order_table( + scores_order, user_number_order, max_order + ) + #  順位表が作成した場合はそれを返す if order_table_array == []: return "WAIT"