ajouter new this manquants

front
Gwenael PLANCHON 1 year ago
parent 5ed13a011c
commit 58757670cd

@ -6,32 +6,32 @@ export class Kahoot extends DataObject{
super(parsedJSON)
}
static async obtenirQuestion(){
return JSON.parse(`
return new this(JSON.parse(`
{
"question":"Qui a reçu le prix Nobel de chimie en 1911, pour avoir réussi à isoler un gramme de radium ?",
"reponses":["Marie Curie","Einstein","Sophie Germain","Ada Lovelace"],
"tempsLimite":${Date.now()+10000 /* maintenant + 10 secondes pour repondre*/}
}
`)
`))
}
static async obtenirScore(){
return JSON.parse(`
return new this(JSON.parse(`
{
"score":1337,
"pointsGagne":100,
"leaderboard":{"Moi":1337, "Titouan":320},
"tempsLimite":${Date.now()+10000 /* maintenant + 10 secondes le temps de regarder les scores*/}
}
`)
`))
}
static async obtenirSalleAttente(){
return JSON.parse(`
return new this(JSON.parse(`
{
"joueurs":["Moi","Titouan"],
"partieDemarree":true,
"tempsLimite":${Date.now()+10000 /* maintenant + 1 seconde*/}
}
`)
`))
}
}

Loading…
Cancel
Save