aboutsummaryrefslogtreecommitdiff
path: root/src/ch/epfl
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2016-05-10 19:09:50 +0200
committerPacien TRAN-GIRARD2016-05-10 19:09:50 +0200
commite3e9e9a8696f1604c4b3590c142ead48167210b4 (patch)
tree44c61e98676936df7cd0a974c49d1bcaa8fe1daa /src/ch/epfl
parent908be22031595558329c0f7679003a260b5939cc (diff)
downloadxblast-e3e9e9a8696f1604c4b3590c142ead48167210b4.tar.gz
Statify method
Diffstat (limited to 'src/ch/epfl')
-rw-r--r--src/ch/epfl/xblast/client/XBlastComponent.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ch/epfl/xblast/client/XBlastComponent.java b/src/ch/epfl/xblast/client/XBlastComponent.java
index e734d2d..fe5bf5a 100644
--- a/src/ch/epfl/xblast/client/XBlastComponent.java
+++ b/src/ch/epfl/xblast/client/XBlastComponent.java
@@ -119,6 +119,17 @@ public final class XBlastComponent extends JComponent {
119 return coordinateComparator.thenComparing(idComparator); 119 return coordinateComparator.thenComparing(idComparator);
120 } 120 }
121 121
122 /**
123 * Draws the players on the graphic context.
124 *
125 * @param g the graphic context
126 * @param players the list of players to be displayed
127 */
128 private static void drawPlayers(Graphics2D g, List<GameState.Player> players) {
129 for (GameState.Player p : players)
130 Painter.drawImage(g, Grid.positionForPlayer(p), p.image());
131 }
132
122 private GameState gameState; 133 private GameState gameState;
123 private PlayerID playerID; 134 private PlayerID playerID;
124 135
@@ -164,15 +175,4 @@ public final class XBlastComponent extends JComponent {
164 drawPlayers(g, Lists.sorted(this.gameState.players(), buildPlayerComparator(this.playerID))); 175 drawPlayers(g, Lists.sorted(this.gameState.players(), buildPlayerComparator(this.playerID)));
165 } 176 }
166 177
167 /**
168 * Draw the players on the graphic context.
169 *
170 * @param g the graphic context
171 * @param players the list of players to be displayed
172 */
173 private void drawPlayers(Graphics2D g, List<GameState.Player> players) {
174 for (GameState.Player p : players)
175 Painter.drawImage(g, Grid.positionForPlayer(p), p.image());
176 }
177
178} 178}