supression import inutile et patch refresh
This commit is contained in:
@@ -207,6 +207,7 @@ public class Joueur {
|
||||
mana -= handCard.getCost();
|
||||
coms.send(mana);
|
||||
handCard.onCardPlaced(board);
|
||||
refreshAllCard(adversaire);
|
||||
} else {
|
||||
System.out.println("the zone is not avaliable");
|
||||
coms.send(Command.NOK);
|
||||
@@ -546,6 +547,28 @@ public class Joueur {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void refreshAllCard(Joueur adversaire) throws IOException {
|
||||
int index = 0;
|
||||
Iterator<Card> it = board.getIterator();
|
||||
while(it.hasNext())
|
||||
{
|
||||
Card c = it.next();
|
||||
if(c != null)
|
||||
{
|
||||
if(!(c.getHealth() == 0))
|
||||
{
|
||||
updateCardHp(c, adversaire);
|
||||
updateCardAtk(c, adversaire);
|
||||
}else {
|
||||
destroyCard(index+"", adversaire);
|
||||
}
|
||||
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Deck getDeck() {
|
||||
return deck;
|
||||
|
||||
Reference in New Issue
Block a user