This commit is contained in:
@@ -12,10 +12,14 @@ var tdv_sdk = {
|
|||||||
gameID: null,
|
gameID: null,
|
||||||
userId: null,
|
userId: null,
|
||||||
leaderboardData: null,
|
leaderboardData: null,
|
||||||
|
|
||||||
gameStartTime: null,
|
gameStartTime: null,
|
||||||
|
questionStartTime: null,
|
||||||
|
lastAnswerResult: -1,
|
||||||
endTime: null,
|
endTime: null,
|
||||||
instructions: "Sắp xếp các từ thành câu đúng!",
|
instructions: "Sắp xếp các từ thành câu đúng!",
|
||||||
serverDataLoaded: false,
|
serverDataLoaded: false,
|
||||||
|
waitingForServerVerify: false,
|
||||||
|
|
||||||
// ===== GAME MODE =====
|
// ===== GAME MODE =====
|
||||||
gameMode: "fill_blank", // "full_order" | "fill_blank"
|
gameMode: "fill_blank", // "full_order" | "fill_blank"
|
||||||
@@ -43,49 +47,10 @@ var tdv_sdk = {
|
|||||||
instructions: "Arrange the words to form correct sentences!",
|
instructions: "Arrange the words to form correct sentences!",
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
"sentence": "There are some toys in the box.",
|
"id": "sent_test_001",
|
||||||
"parts": [
|
"sentence": "I love playing football",
|
||||||
"There",
|
"missing_letter_count": 2,
|
||||||
"are",
|
"audio_url": "https://api.tuandv.com/sentence.mp3"
|
||||||
"some",
|
|
||||||
"toys",
|
|
||||||
"in",
|
|
||||||
"the",
|
|
||||||
"box."
|
|
||||||
],
|
|
||||||
"is_scrambled": true,
|
|
||||||
"original_quote": "1. some toys are There in the box.",
|
|
||||||
"id": "SE-1768646900503-0",
|
|
||||||
"game_type": "sequence"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sentence": "She is eating a cake.",
|
|
||||||
"parts": [
|
|
||||||
"She",
|
|
||||||
"is",
|
|
||||||
"eating",
|
|
||||||
"a",
|
|
||||||
"cake."
|
|
||||||
],
|
|
||||||
"is_scrambled": true,
|
|
||||||
"original_quote": "2. is She a cake . eating",
|
|
||||||
"id": "SE-1768646900503-1",
|
|
||||||
"game_type": "sequence"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sentence": "May I visit the gift shop?",
|
|
||||||
"parts": [
|
|
||||||
"May",
|
|
||||||
"I",
|
|
||||||
"visit",
|
|
||||||
"the",
|
|
||||||
"gift",
|
|
||||||
"shop?"
|
|
||||||
],
|
|
||||||
"is_scrambled": true,
|
|
||||||
"original_quote": "3. visit May I gift shop ? the",
|
|
||||||
"id": "SE-1768646900503-2",
|
|
||||||
"game_type": "sequence"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -118,7 +83,7 @@ var tdv_sdk = {
|
|||||||
var urlParams = new URLSearchParams(window.location.search);
|
var urlParams = new URLSearchParams(window.location.search);
|
||||||
|
|
||||||
this.mode = config.mode || urlParams.get('mode') || 'live';
|
this.mode = config.mode || urlParams.get('mode') || 'live';
|
||||||
this.game_code = config.game_code || urlParams.get('game_code') || 'SQ_SENTENCE';
|
this.game_code = config.game_code || urlParams.get('game_code') || 'G120';
|
||||||
|
|
||||||
// Auto preview
|
// Auto preview
|
||||||
if (window.self === window.parent && this.mode === 'live') {
|
if (window.self === window.parent && this.mode === 'live') {
|
||||||
|
|||||||
Reference in New Issue
Block a user