diff --git a/flask/testapp/static/javascript/beautyVote.js b/flask/testapp/static/javascript/beautyVote.js index d6298b6..1569af4 100644 --- a/flask/testapp/static/javascript/beautyVote.js +++ b/flask/testapp/static/javascript/beautyVote.js @@ -12,7 +12,7 @@ } join(question, realAnswer, choiceA, choiceB, choiceC, choiceD){ this.question = question; - this.realAnwer = realAnswer; + this.realAnswer = realAnswer; this.choiceA = choiceA; this.choiceB = choiceB; this.choiceC = choiceC; @@ -133,49 +133,6 @@ timer = 0; CheckResult(); //順位表を受け取るための処理 } - - //結果表示 - case RESULT_SCENE: - // showResult(); - // if(tapC == 1){ - // tapC ++; - // if(80 <= tapX && tapX <= 180 && 1080 <= tapY && tapY <= 1130){ - // console.log("show result") - // break; - // } - // else{ - // for(var i = 0; i < MAX_ROUND; i ++){ - // if(450 + 50*i < tapX && tapX < 450 + 50*i + 50 && 1080 < tapY && tapY < 1130){ - // console.log("show round"+i) - // showOtherResult(i) - // view_result = i - // scene = CHECK_RESULT - // } - // } - // } - // } - break; - - case CHECK_RESULT: - // showOtherResult(view_result); - // if(tapC == 1){ - // tapC ++; - // if(80 <= tapX && tapX <= 180 && 1080 <= tapY && tapY <= 1130){ - // showResult(); - // console.log("show result") - // scene = RESULT_SCENE; - // } - // else{ - // for(var i = 0; i < MAX_ROUND; i ++){ - // if(450 + 50*i <= tapX && tapX <= 450 + 50*i + 50 && 1080 <= tapY && tapY <= 1130){ - // showOtherResult(i) - // console.log("show round"+(i+1)) - // view_result = i - // } - // } - // } - // } - break; } } @@ -502,6 +459,6 @@ -var realAnswer = new Array(MAX_ROUND).fill(0); +var realAnswer = [C,A,B,B,C,C,C,C,B,B]; var view_result = 0; \ No newline at end of file diff --git a/flask/testapp/static/javascript/resultScreen.js b/flask/testapp/static/javascript/resultScreen.js index cb3cd7d..fe245fb 100644 --- a/flask/testapp/static/javascript/resultScreen.js +++ b/flask/testapp/static/javascript/resultScreen.js @@ -54,28 +54,22 @@ fText(int(timer/30), 900, 1100, 50, "red"); } if(scene == ROUND_RESULT){ - /* - fText(CheckPeople(A, round) +"人", 275, 500, 50, "black"); - fText(checkOrder(A, round) + "Pt", 400, 500, 50, "black"); - fText(CheckPeople(B, round)+"人", 725, 500, 50, "black"); - fText(checkOrder(B, round) + "Pt", 850, 500, 50, "black"); - fText(CheckPeople(C, round)+"人", 275, 800, 50, "black"); - fText(checkOrder(C, round) + "Pt", 400, 800, 50, "black"); - fText(CheckPeople(D, round)+"人", 725, 800, 50, "black"); - fText(checkOrder(D, round) + "Pt", 850, 800, 50, "black"); - */ - //fText(CheckPeople(A, round) +"人", 100, 500, 50, "white"); - //fText(CheckPeople(A, round) +"人", 100, 330, 50, "white"); - fText(CheckPeople(A, round) +"人", 400, 330, 50, "white"); + fText(CheckPeople(A, round) +"人", 400, 340, 50, "white"); fText(checkOrder(A, round) + "Pt", 400, 500, 50, "white"); - fText(CheckPeople(B, round)+"人", 850, 330, 50, "white"); + fText(CheckPeople(B, round)+"人", 850, 340, 50, "white"); fText(checkOrder(B, round) + "Pt", 850, 500, 50, "white"); - fText(CheckPeople(C, round)+"人", 400, 630, 50, "white"); + fText(CheckPeople(C, round)+"人", 400, 640, 50, "white"); fText(checkOrder(C, round) + "Pt", 400, 800, 50, "white"); - fText(CheckPeople(D, round)+"人", 850, 630, 50, "white"); + fText(CheckPeople(D, round)+"人", 850, 640, 50, "white"); fText(checkOrder(D, round) + "Pt", 850, 800, 50, "white"); - fText("正解:"+string[question[round].realAnswer], 800, 900, 50, "black"); + if(language==JPN){ + fText("正解:"+string[question[round].realAnswer], 800, 900, 50, "black"); + } + else{ + fText("Answer : "+string[question[round].realAnswer], 780, 900, 50, "black"); + } + } if(scene == WAIT_SCENE){ setAlp(50); @@ -179,61 +173,6 @@ } } -// function showResult(){ -// if(language==JPN){ -// window.open("showResultJPN.html") -// } -// else if (language==ENG){ -// window.open("showResultENG.html") -// } -// } -// function showResult(){ - -// if(language==JPN){ -// fText("結果発表", 480, 100, 80, "white"); -// fText("順位", 150, 410, 50, "black"); -// fText("ユーザー名", 390, 410, 50, "black"); -// fText("スコア", 730, 410, 50, "black"); -// fText("結果", 100, 1100, 50, "red"); -// } -// else{ -// fText("RESULT", 480, 100, 80, "white"); -// fText("order", 150, 410, 50, "black"); -// fText("username", 390, 410, 50, "black"); -// fText("score", 730, 410, 50, "black"); -// fText("result", 100, 1100, 50, "red"); -// } - - // if(scene == RESULT_SCENE){ - // if(language==JPN){ - // fText(player.name+"さんのスコアは" + player.score + "点です!", 480, 200, 50, "gold"); - // } - // else{ - // fText(player.name+"'s score is " + player.score + "Points!", 480, 200, 50, "gold"); - // } - // let splitOrder = orderTable.split("\n"); - // for (var i = 0; i < splitOrder.length; i++){ - // let arr = splitOrder[i].split(" "); // 空白で文字列を分割 - // if(arr[0]=="1位"){ - // fText(arr[0], 150, 480+60*i, 50, "gold"); - // } - // else if(arr[0]=="2位"){ - // fText(arr[0], 150, 480+60*i, 50, "silver"); - // } - // else if(arr[0]=="3位"){ - // fText(arr[0], 150, 480+60*i, 50, "#8c4841"); - // } - // else{ - // fText((i+1)+"位", 150, 480+60*i, 50, "black"); - // } - // fText(arr[1], 390, 480+60*i, 50, "black"); - // fText(arr[2], 730, 480+60*i, 50, "black"); - // } - // } - // for(var i = 0; i < MAX_ROUND; i ++){ - // fText((i+1), 480 + 50*i, 1100, 50, "black"); - // } - // } function showResult(){