Add status removal when item changes boardElement

develop
Nathan Steel 1 year ago
parent 572fc1b40b
commit 10c825a7d8

@ -478,6 +478,8 @@ class Board{
this.moveElementPositions(0, elementFrom, fromPosition, playerFrom); this.moveElementPositions(0, elementFrom, fromPosition, playerFrom);
//console.log(JSON.stringify(boardElement)); //console.log(JSON.stringify(boardElement));
//console.log(JSON.stringify(listPosition)); //console.log(JSON.stringify(listPosition));
this.removeItemStatus(itemKey);
this.drawBoard(); this.drawBoard();
return 1; // Got a loop that calls a loop, and checks the new values atm, so this keeps counting down return 1; // Got a loop that calls a loop, and checks the new values atm, so this keeps counting down
@ -765,6 +767,10 @@ class Board{
remainingShieldCount(playerId){ remainingShieldCount(playerId){
return getCurrentPositionAndLength('shield', playerId)[1]; return getCurrentPositionAndLength('shield', playerId)[1];
} }
removeItemStatus(itemKey){
// TODO: Remove status of card, and do/don't do effect depending on locationTo/locationFrom?
cardStatus[itemKey] = null;
}
} }
// TODO: TEMP!! Replace soon // TODO: TEMP!! Replace soon

Loading…
Cancel
Save