diff --git a/beautyVote.js b/beautyVote.js
index ab9ffc4..2d850b8 100644
--- a/beautyVote.js
+++ b/beautyVote.js
@@ -59,78 +59,86 @@
function mainloop(){
- if(timer < 900){
- timer ++;
+
+ switch(scene){
+ case 1:
+ if(timer < 900){
+ timer ++;
+ }
+ fill("silver");
+ setAlp(50);
+ fRect(50, 50, 855, 100, "black");
+ fText("Q.", 110, 100, 50, "white");
+ fRect(45, 295, 865, 560, "white");
+ fRect(50, 300, 400, 250, "black");
+ fRect(500, 300, 400, 250, "black");
+ fRect(50, 600, 400, 250, "black");
+ fRect(500, 600, 400, 250, "black");
+
+ sRect(45, 880, 865, 40, "black");
+ fRect(45, 880, (timer/900)*865, 40, "red");
+ setAlp(100);
+
+
+ fText("A.", 100, 425, 40, "white");
+ fText("B.", 550, 425, 40, "white");
+ fText("C.", 100, 725, 40, "white");
+ fText("D.", 550, 725, 40, "white");
+
+ fText(question[round].question, 480, 100, 30, "white");
+ fText(question[round].choiceA, 275, 425, 25, "white");
+ fText(question[round].choiceB, 725, 425, 25, "white");
+ fText(question[round].choiceC, 275, 725, 25, "white");
+ fText(question[round].choiceD, 725, 725, 25, "white");
+
+ fText(int(timer/30), 900, 1100, 50, "red");
+
+ setAlp(50);
+
+ fText((round+1) + "回戦", 100, 1000, 50, "red");
+ for(var i = 0; i < MAX_ROUND; i ++){
+ if(player.points[i] == CORRECT){
+ fText("O", 480 + 50*i, 1000, 50, "red");
+ }
+ else if(player.points[i] == WRONG) {
+ fText("X", 480 + 50*i, 1000, 50, "blue");
+ }
+ else{
+ fText("*", 480 + 50*i, 1000, 50, "black");
+ }
+ }
+
+ if(round >= MAX_ROUND){
+ fText("あなたのスコアは" + player.calcScore() + "点です", 480, 600, 80, "gold");
+ }
+
+ if(tapC == 1){
+ tapC ++;
+
+ if(round < MAX_ROUND){
+ if(50 <= tapX && tapX <= 450 && 300 <= tapY && tapY <= 550){
+ player.choice = A;
+ checkAnswer();
+ scene = 2;
+ }
+ else if(500 <= tapX && tapX <= 900 && 300 <= tapY && tapY <= 550){
+ player.choice = B;
+ checkAnswer();
+ }
+ else if(50 <= tapX && tapX <= 450 && 600 <= tapY && tapY <= 850){
+ player.choice = C;
+ checkAnswer();
+ }
+ else if(500 <= tapX && tapX <= 900 && 600 <= tapY && tapY <= 850){
+ player.choice = D;
+ checkAnswer();
+ }
+ }
+ }
+ break;
+ case 2:
+ showResult();
}
- fill("silver");
- setAlp(50);
- fRect(50, 50, 855, 100, "black");
- fText("Q.", 110, 100, 50, "white");
- fRect(45, 295, 865, 560, "white");
- fRect(50, 300, 400, 250, "black");
- fRect(500, 300, 400, 250, "black");
- fRect(50, 600, 400, 250, "black");
- fRect(500, 600, 400, 250, "black");
-
- sRect(45, 880, 865, 40, "black");
- fRect(45, 880, (timer/900)*865, 40, "red");
- setAlp(100);
-
-
- fText("A.", 100, 425, 50, "white");
- fText("B.", 550, 425, 50, "white");
- fText("C.", 100, 725, 50, "white");
- fText("D.", 550, 725, 50, "white");
-
- fText(question[round].question, 480, 100, 30, "white");
- fText(question[round].choiceA, 275, 425, 30, "white");
- fText(question[round].choiceB, 725, 425, 30, "white");
- fText(question[round].choiceC, 275, 725, 30, "white");
- fText(question[round].choiceD, 725, 725, 30, "white");
-
- fText(int(timer/30), 900, 1100, 50, "red");
-
- setAlp(50);
-
- fText((round+1) + "回戦", 100, 1000, 50, "red");
- for(var i = 0; i < MAX_ROUND; i ++){
- if(player.points[i] == CORRECT){
- fText("O", 480 + 50*i, 1000, 50, "red");
- }
- else if(player.points[i] == WRONG) {
- fText("X", 480 + 50*i, 1000, 50, "blue");
- }
- else{
- fText("*", 480 + 50*i, 1000, 50, "black");
- }
- }
-
- if(round >= MAX_ROUND){
- fText("あなたのスコアは" + player.calcScore() + "点です", 480, 600, 80, "gold");
- }
-
- if(tapC == 1){
- tapC ++;
-
- if(round < MAX_ROUND){
- if(50 <= tapX && tapX <= 450 && 300 <= tapY && tapY <= 550){
- player.choice = A;
- checkAnswer();
- }
- else if(500 <= tapX && tapX <= 900 && 300 <= tapY && tapY <= 550){
- player.choice = B;
- checkAnswer();
- }
- else if(50 <= tapX && tapX <= 450 && 600 <= tapY && tapY <= 850){
- player.choice = C;
- checkAnswer();
- }
- else if(500 <= tapX && tapX <= 900 && 600 <= tapY && tapY <= 850){
- player.choice = D;
- checkAnswer();
- }
- }
- }
}
@@ -169,6 +177,14 @@
var CORRECT = 1;
var WRONG = 0;
+var scene = 1;
+
+var BLOCK_SIZE = 5;
+var my_order = 8;
+var ranking_order = ["ルフィ", "ゾロ", "ジンベエ", "サンジ", "ロビン", "ウソップ", "フランキー", "ブルック", "ナミ", "チョッパー"]
+var scoreing_order = [3000000000,1110000000, 1100000000, 1032000000, 930000000, 500000000, 394000000, 383000000, 366000000, 1000]
+var MAX_ORDER = 10;
+
var question = new Array(MAX_ROUND);
for(var i = 0; i < MAX_ROUND+1; i ++){
question[i] = new Question();
diff --git a/index.html b/index.html
index 2adfaa3..f0bd57d 100644
--- a/index.html
+++ b/index.html
@@ -16,9 +16,16 @@
+
+
+
+
+
+
+