|
|
|
|
@ -76,14 +76,14 @@ class Board{
|
|
|
|
|
|
|
|
|
|
this.drawCardsECS(); // Atop most everything atm for testing
|
|
|
|
|
|
|
|
|
|
if(this.checkGameWin == true){
|
|
|
|
|
if(this.checkGameWin() == true){
|
|
|
|
|
this.drawWin();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
checkGameWin(){
|
|
|
|
|
// TODO: Change logic to ECSey, and move into main loop (for other win-cons besides direct attack)
|
|
|
|
|
//if(opponentShield.length <= 0){return true;
|
|
|
|
|
// If opponent shield is 0 then you win TODO: Otherwincons, check w/l for each player
|
|
|
|
|
if(this.remainingShieldCount(1) <= 0){return true;}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -758,6 +758,9 @@ class Board{
|
|
|
|
|
cardStatus[itemKey] = 'tapped';
|
|
|
|
|
// Do any other 'on tap' effects, etc. in the future
|
|
|
|
|
}
|
|
|
|
|
remainingShieldCount(playerId){
|
|
|
|
|
return getCurrentPositionAndLength('shield', playerId)[1];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO: TEMP!! Replace soon
|
|
|
|
|
|