merged updateInfo and update in GamePanel
parent
6eaaac3eb3
commit
01f7dfbf85
|
@ -291,7 +291,6 @@ public class GameController {
|
|||
//SwingUtilities.invokeLater(new Runnable() {
|
||||
invokeAndWait(new Runnable() {
|
||||
public void run() {
|
||||
gamePanel.updateInfo();
|
||||
gamePanel.update();
|
||||
}
|
||||
});
|
||||
|
@ -300,7 +299,9 @@ public class GameController {
|
|||
public void invokeAndWait(final Runnable task) {
|
||||
if (SwingUtilities.isEventDispatchThread()) {
|
||||
task.run();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
SwingUtilities.invokeAndWait(task);
|
||||
} catch (InterruptedException err) {
|
||||
|
@ -309,7 +310,6 @@ public class GameController {
|
|||
throw new RuntimeException(err.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String getMessageWithSource(final MagicSource source,final String message) {
|
||||
if (source==null) {
|
||||
|
|
|
@ -306,11 +306,8 @@ public final class GamePanel extends JPanel {
|
|||
}
|
||||
}
|
||||
|
||||
public void updateInfo() {
|
||||
viewerInfo.update(game);
|
||||
}
|
||||
|
||||
public void update() {
|
||||
viewerInfo.update(game);
|
||||
playerViewer.update();
|
||||
opponentViewer.update();
|
||||
gameTournamentViewer.update();
|
||||
|
|
Loading…
Reference in New Issue