game selection added

This commit is contained in:
2022-02-04 14:11:50 +01:00
parent be9d59344f
commit 4569d059ff
2 changed files with 6 additions and 3 deletions

View File

@@ -11,7 +11,7 @@
width: 40px;
height: 40px;
border-radius: 50%;
border: 1px solid black;
border: 0.5px solid black;
display: inline-block;
padding: 6px 5px;
}

View File

@@ -46,6 +46,9 @@ export class ValuesAlignPage {
return;
}
let addvalues = await this.alert.presentAlertConfirm("Missing values?", "Do you want to add values to the list?", "yes", "no");
let nextGame = addvalues == "yes" ? "Add" : "Ranking";
this.alert.showLoader("Please wait");
// remove all the cards with value false from array
for(var i = 0; i < this.game.cardset.length; i++){
@@ -57,8 +60,8 @@ export class ValuesAlignPage {
}
// set storage and go to the next page
await this.game.saveGameStorage("Values", "Ranking", this.game.cardset);
await this.game.saveGameStorage("Values", nextGame, this.game.cardset);
this.alert.hideLoader();
this.router.navigateByUrl(`/valuesRanking`);
this.router.navigateByUrl(`/values${nextGame}`);
}
}