|
|
@ -6,32 +6,32 @@ export class Kahoot extends DataObject{
|
|
|
|
super(parsedJSON)
|
|
|
|
super(parsedJSON)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
static async obtenirQuestion(){
|
|
|
|
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 ?",
|
|
|
|
"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"],
|
|
|
|
"reponses":["Marie Curie","Einstein","Sophie Germain","Ada Lovelace"],
|
|
|
|
"tempsLimite":${Date.now()+10000 /* maintenant + 10 secondes pour repondre*/}
|
|
|
|
"tempsLimite":${Date.now()+10000 /* maintenant + 10 secondes pour repondre*/}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`)
|
|
|
|
`))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
static async obtenirScore(){
|
|
|
|
static async obtenirScore(){
|
|
|
|
return JSON.parse(`
|
|
|
|
return new this(JSON.parse(`
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"score":1337,
|
|
|
|
"score":1337,
|
|
|
|
"pointsGagne":100,
|
|
|
|
"pointsGagne":100,
|
|
|
|
"leaderboard":{"Moi":1337, "Titouan":320},
|
|
|
|
"leaderboard":{"Moi":1337, "Titouan":320},
|
|
|
|
"tempsLimite":${Date.now()+10000 /* maintenant + 10 secondes le temps de regarder les scores*/}
|
|
|
|
"tempsLimite":${Date.now()+10000 /* maintenant + 10 secondes le temps de regarder les scores*/}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`)
|
|
|
|
`))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
static async obtenirSalleAttente(){
|
|
|
|
static async obtenirSalleAttente(){
|
|
|
|
return JSON.parse(`
|
|
|
|
return new this(JSON.parse(`
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"joueurs":["Moi","Titouan"],
|
|
|
|
"joueurs":["Moi","Titouan"],
|
|
|
|
"partieDemarree":true,
|
|
|
|
"partieDemarree":true,
|
|
|
|
"tempsLimite":${Date.now()+10000 /* maintenant + 1 seconde*/}
|
|
|
|
"tempsLimite":${Date.now()+10000 /* maintenant + 1 seconde*/}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`)
|
|
|
|
`))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|