cleanup align page
This commit is contained in:
parent
93c3387afd
commit
5835ddf567
@ -1,4 +1,4 @@
|
|||||||
import { Component, Renderer2 } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { AlertService } from '../services/alert.service';
|
import { AlertService } from '../services/alert.service';
|
||||||
import { GameService } from '../services/game.service';
|
import { GameService } from '../services/game.service';
|
||||||
@ -12,7 +12,7 @@ export class ValuesAlignPage {
|
|||||||
|
|
||||||
mayContinue: boolean;
|
mayContinue: boolean;
|
||||||
|
|
||||||
constructor(private router: Router, private game: GameService, private renderer: Renderer2, public alert: AlertService) {}
|
constructor(private router: Router, private game: GameService, public alert: AlertService) {}
|
||||||
|
|
||||||
async checkValues(){
|
async checkValues(){
|
||||||
|
|
||||||
@ -34,9 +34,9 @@ export class ValuesAlignPage {
|
|||||||
if(!(await this.checkValues())){
|
if(!(await this.checkValues())){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.mayContinue = true;
|
|
||||||
// User may continue
|
// User may continue
|
||||||
console.log("hihi go go");
|
this.mayContinue = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
async continueGame(){
|
async continueGame(){
|
||||||
@ -50,7 +50,6 @@ export class ValuesAlignPage {
|
|||||||
// remove all the cards with value false from array
|
// remove all the cards with value false from array
|
||||||
for(var i = 0; i < this.game.cardset.length; i++){
|
for(var i = 0; i < this.game.cardset.length; i++){
|
||||||
const card = this.game.cardset[i];
|
const card = this.game.cardset[i];
|
||||||
console.log(card.id);
|
|
||||||
if(card.value == 2){
|
if(card.value == 2){
|
||||||
this.game.cardset.splice(i,1);
|
this.game.cardset.splice(i,1);
|
||||||
i--;
|
i--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user