This commit is contained in:
@@ -21,10 +21,7 @@ function getRandomQuestion() {
|
||||
const shuffled = [...data].sort(() => 0.5 - Math.random());
|
||||
|
||||
// Lấy 4 con đầu tiên
|
||||
const options = shuffled.slice(0, 3).map(item => ({
|
||||
...item,
|
||||
image: getImage(item.image)
|
||||
}));
|
||||
const options = shuffled.slice(0, 3);
|
||||
|
||||
// Chọn 1 trong 4 làm đáp án đúng
|
||||
const correct = options[Math.floor(Math.random() * options.length)];
|
||||
@@ -36,7 +33,6 @@ function getRandomQuestion() {
|
||||
return window.items;
|
||||
}
|
||||
|
||||
|
||||
function voiceItem(name){
|
||||
const newAudio = new Audio();
|
||||
newAudio.src = "https://audio.senaai.vn/audio/en_female_1_"+name.toLowerCase()+".mp3";
|
||||
@@ -47,5 +43,5 @@ function voiceItem(name){
|
||||
|
||||
|
||||
function getImage(name) {
|
||||
return "https://senaai.tech/games/RCV-QuizSpin2/" + name;
|
||||
return "https://senaai.tech/games/RCV_QuizSpin2/" + name;
|
||||
}
|
||||
Reference in New Issue
Block a user