aboutsummaryrefslogtreecommitdiff
path: root/src/ch
diff options
context:
space:
mode:
Diffstat (limited to 'src/ch')
-rw-r--r--src/ch/epfl/xblast/client/XBlastComponent.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ch/epfl/xblast/client/XBlastComponent.java b/src/ch/epfl/xblast/client/XBlastComponent.java
index 388a208..e734d2d 100644
--- a/src/ch/epfl/xblast/client/XBlastComponent.java
+++ b/src/ch/epfl/xblast/client/XBlastComponent.java
@@ -109,12 +109,12 @@ public final class XBlastComponent extends JComponent {
109 109
110 } 110 }
111 111
112 private static Comparator<GameState.Player> buildPlayerComparator(PlayerID blackSheep) { 112 private static Comparator<GameState.Player> buildPlayerComparator(PlayerID priorityPlayer) {
113 Comparator<GameState.Player> coordinateComparator = 113 Comparator<GameState.Player> coordinateComparator =
114 (p1, p2) -> p1.position().compareTo(p2.position()); 114 (p1, p2) -> p1.position().compareTo(p2.position());
115 115
116 Comparator<GameState.Player> idComparator = 116 Comparator<GameState.Player> idComparator =
117 (p1, p2) -> p1.id() == blackSheep ? -1 : 0; 117 (p1, p2) -> p1.id() == priorityPlayer ? -1 : 0;
118 118
119 return coordinateComparator.thenComparing(idComparator); 119 return coordinateComparator.thenComparing(idComparator);
120 } 120 }