From 16a5c156ca832404bf0caec091a83ce9d4e20654 Mon Sep 17 00:00:00 2001 From: spekulaas Date: Fri, 7 Jan 2022 17:52:32 +0100 Subject: [PATCH] changed savegame, and cards > data --- AuthentesApp/src/app/services/game.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AuthentesApp/src/app/services/game.service.ts b/AuthentesApp/src/app/services/game.service.ts index 9ccc23a..93930f3 100644 --- a/AuthentesApp/src/app/services/game.service.ts +++ b/AuthentesApp/src/app/services/game.service.ts @@ -33,9 +33,9 @@ export class GameService { 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 - 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 @@ -46,7 +46,7 @@ export class GameService { // if (data["Status"] == "Success") { // 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; // }), @@ -58,7 +58,7 @@ export class GameService { console.log("[GameService] Initializing Value game..."); const token = await this.storage.get("VALUESGAME_TOKEN"); // console.log(this.cardset["cards"]); - this.cardset = token["cards"]; + this.cardset = token["data"]; return token["status"]; } } \ No newline at end of file