add more choices
This commit is contained in:
@@ -69,11 +69,15 @@ const utils = {
|
||||
},
|
||||
contains: function (array, item) {
|
||||
return array.indexOf(item) >= 0;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Array.prototype.shuffle = function() { return utils.shuffle(this);};
|
||||
Array.prototype.contains = function(item) { return utils.contains(this, item);};
|
||||
Array.prototype.shuffle = function () {
|
||||
return utils.shuffle(this);
|
||||
};
|
||||
Array.prototype.contains = function (item) {
|
||||
return utils.contains(this, item);
|
||||
};
|
||||
|
||||
let app = {
|
||||
el: "#app",
|
||||
@@ -86,7 +90,7 @@ let app = {
|
||||
rh: true,
|
||||
rk: false,
|
||||
hk: false,
|
||||
answers: 4,
|
||||
answers: 6,
|
||||
},
|
||||
kanas: [],
|
||||
question: "あ",
|
||||
@@ -159,7 +163,7 @@ let app = {
|
||||
answer: function (v) {
|
||||
const self = this;
|
||||
|
||||
const question = self.kanas.filter(kana => {
|
||||
const question = self.kanas.filter((kana) => {
|
||||
return kana.contains(self.question);
|
||||
})[0];
|
||||
|
||||
@@ -170,7 +174,6 @@ let app = {
|
||||
self.score = 0;
|
||||
self.wrongAnswers.push(v);
|
||||
}
|
||||
|
||||
},
|
||||
changeOption: function (v) {
|
||||
const self = this;
|
||||
|
||||
Reference in New Issue
Block a user