Fix so manlands are moved to creature row properly in mobile app

This commit is contained in:
drdev
2015-04-12 20:12:23 +00:00
parent 7af4cf87ea
commit 6b59666dab
4 changed files with 9 additions and 4 deletions

View File

@@ -96,6 +96,7 @@ public class MatchController extends AbstractGuiGame {
return avatar; return avatar;
} }
@Override
public void refreshCardDetails(Iterable<CardView> cards) { public void refreshCardDetails(Iterable<CardView> cards) {
//ensure cards appear in the correct row of the field //ensure cards appear in the correct row of the field
for (VPlayerPanel pnl : view.getPlayerPanels().values()) { for (VPlayerPanel pnl : view.getPlayerPanels().values()) {

View File

@@ -82,15 +82,13 @@ public class FControlGameEventHandler extends IGameEventVisitor.Base<Void> {
synchronized (cardsUpdate) { synchronized (cardsUpdate) {
if (!cardsUpdate.isEmpty()) { if (!cardsUpdate.isEmpty()) {
for (final CardView c : cardsUpdate) { matchController.updateCards(cardsUpdate);
matchController.updateSingleCard(c);
}
cardsUpdate.clear(); cardsUpdate.clear();
} }
} }
synchronized (cardsRefreshDetails) { synchronized (cardsRefreshDetails) {
if (!cardsRefreshDetails.isEmpty()) { if (!cardsRefreshDetails.isEmpty()) {
matchController.updateCards(cardsRefreshDetails); matchController.refreshCardDetails(cardsRefreshDetails);
cardsRefreshDetails.clear(); cardsRefreshDetails.clear();
} }
} }

View File

@@ -48,6 +48,7 @@ public interface IGuiGame {
void updateZones(Iterable<PlayerZoneUpdate> zonesToUpdate); void updateZones(Iterable<PlayerZoneUpdate> zonesToUpdate);
void updateSingleCard(CardView card); void updateSingleCard(CardView card);
void updateCards(Iterable<CardView> cards); void updateCards(Iterable<CardView> cards);
void refreshCardDetails(Iterable<CardView> cards);
void updateManaPool(Iterable<PlayerView> manaPoolUpdate); void updateManaPool(Iterable<PlayerView> manaPoolUpdate);
void updateLives(Iterable<PlayerView> livesUpdate); void updateLives(Iterable<PlayerView> livesUpdate);
void setPanelSelection(CardView hostCard); void setPanelSelection(CardView hostCard);

View File

@@ -91,6 +91,11 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
} }
} }
@Override
public void refreshCardDetails(final Iterable<CardView> cards) {
//not needed for base game implementation
}
public String getCardImageKey(final CardStateView csv) { public String getCardImageKey(final CardStateView csv) {
return csv.getImageKey(getLocalPlayers()); return csv.getImageKey(getLocalPlayers());
} }