Skip to content

Commit

Permalink
battlefield cards now highlight, and can be activated (with unimpleme…
Browse files Browse the repository at this point in the history
…nted targeting)
  • Loading branch information
bazola committed Sep 19, 2014
1 parent 209f684 commit 6f8d036
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ private void processUseableActionMessage(UseableActionMessage message) {
if (zoneView.getAllIds().contains(message.getId())) {
if (zoneView instanceof PlayerHandZoneView) {
((PlayerHandZoneView)zoneView).highlightCard(message.getId(), message);
} else if (zoneView instanceof BattlefieldZoneView) {
((BattlefieldZoneView)zoneView).highlightCard(message.getId(), message);
}
}
}
Expand All @@ -329,8 +331,7 @@ private void processUpdateMessage(UpdateMessage message) {
} else if (message.getId() == this.opponentId) {
this.processUpdateMessageForPlayer(opponentStatBox, message, opponentStatBoxMap);
} else {
//process update message for card
//search through zones to find it
this.processUpdateMessageForCard(message);
}
}
private void processUpdateMessageForPlayer(Pane statBox, UpdateMessage message, Map playerMap) {
Expand All @@ -340,6 +341,16 @@ private void processUpdateMessageForPlayer(Pane statBox, UpdateMessage message,

this.repaintStatBox(statBox, playerMap);
}
private void processUpdateMessageForCard(UpdateMessage message) {
for (ZoneView zoneView : this.zoneViewMap.values()) {
if (zoneView.getAllIds().contains(message.getId())) {
if (zoneView instanceof BattlefieldZoneView) {
//((BattlefieldZoneView)zoneView).highlightCard(message.getId(), message);
System.out.println("Found card for update message");
}
}
}
}

private void processZoneChangeMessage(ZoneChangeMessage message) {
int sourceZoneId = message.getSourceZone();
Expand Down

0 comments on commit 6f8d036

Please sign in to comment.