changed savegame, and cards > data
This commit is contained in:
parent
aab4593f56
commit
16a5c156ca
@ -33,9 +33,9 @@ export class GameService {
|
|||||||
await this.storage.remove(`${game.toUpperCase()}GAME_TOKEN`);
|
await this.storage.remove(`${game.toUpperCase()}GAME_TOKEN`);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async saveGameStorage(game: string, status: string, sort: string, value: any){
|
public async saveGameStorage(game: string, status: string, value: any){
|
||||||
// TODO LOOK AT THIS
|
// TODO LOOK AT THIS
|
||||||
await this.storage.set(`${game.toUpperCase()}GAME_TOKEN`, { status: status, cards: value});
|
await this.storage.set(`${game.toUpperCase()}GAME_TOKEN`, { status: status, data: value});
|
||||||
}
|
}
|
||||||
|
|
||||||
// finish when backend is completed
|
// finish when backend is completed
|
||||||
@ -46,7 +46,7 @@ export class GameService {
|
|||||||
|
|
||||||
// if (data["Status"] == "Success") {
|
// if (data["Status"] == "Success") {
|
||||||
// console.log(data["Data"]);
|
// console.log(data["Data"]);
|
||||||
await this.storage.set(`${game.toUpperCase()}GAME_TOKEN`, { status: "Sorting", cards:[{"id": 1, "title":"Temp_card_1", "value": 0}, {"id": 2, "title":"Temp_card_2", "value": 0}, {"id": 3, "title":"Temp_card_3", "value": 0}, {"id": 4, "title":"Temp_card_4", "value": 0}, {"id": 5, "title":"Temp_card_5", "value": 0}, {"id": 6, "title":"Temp_card_6", "value": 0}, {"id": 7, "title":"Temp_card_7", "value": 0}, {"id": 8, "title":"Temp_card_8", "value": 0}]});
|
await this.storage.set(`${game.toUpperCase()}GAME_TOKEN`, { status: "Sorting", data:[{"id": 1, "title":"Temp_card_1", "value": 0}, {"id": 2, "title":"Temp_card_2", "value": 0}, {"id": 3, "title":"Temp_card_3", "value": 0}, {"id": 4, "title":"Temp_card_4", "value": 0}, {"id": 5, "title":"Temp_card_5", "value": 0}, {"id": 6, "title":"Temp_card_6", "value": 0}, {"id": 7, "title":"Temp_card_7", "value": 0}, {"id": 8, "title":"Temp_card_8", "value": 0}]});
|
||||||
// }
|
// }
|
||||||
// return data;
|
// return data;
|
||||||
// }),
|
// }),
|
||||||
@ -58,7 +58,7 @@ export class GameService {
|
|||||||
console.log("[GameService] Initializing Value game...");
|
console.log("[GameService] Initializing Value game...");
|
||||||
const token = await this.storage.get("VALUESGAME_TOKEN");
|
const token = await this.storage.get("VALUESGAME_TOKEN");
|
||||||
// console.log(this.cardset["cards"]);
|
// console.log(this.cardset["cards"]);
|
||||||
this.cardset = token["cards"];
|
this.cardset = token["data"];
|
||||||
return token["status"];
|
return token["status"];
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user