diff --git a/flask/testapp/static/javascript/beautyVote.js b/flask/testapp/static/javascript/beautyVote.js index 4e5adae..0a8aced 100644 --- a/flask/testapp/static/javascript/beautyVote.js +++ b/flask/testapp/static/javascript/beautyVote.js @@ -162,10 +162,20 @@ } -function checkAnswer(){ +function checkAnswer(){ + var j = 0; for(var i = 0; i < CHOICE_NUMBER; i ++){ if(player.choice == question[round].answer[i]){ - player.points[round] = String(4-i); + player.points[round] = String(4-i+j); + // 選択した人数が同じ数の場合 + if (i>=1){ + if(question[round].people[i]==question[round].people[i-1]){ + j ++; + player.points[round] = String(4-i+j); + break; + } + break; + } break; } }