diff options
-rw-r--r-- | src/ch/epfl/xblast/server/GameState.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ch/epfl/xblast/server/GameState.java b/src/ch/epfl/xblast/server/GameState.java index 65309d5..e133159 100644 --- a/src/ch/epfl/xblast/server/GameState.java +++ b/src/ch/epfl/xblast/server/GameState.java | |||
@@ -232,7 +232,8 @@ public final class GameState { | |||
232 | return p0; | 232 | return p0; |
233 | 233 | ||
234 | if (!newDir.isPresent()) | 234 | if (!newDir.isPresent()) |
235 | return Player.DirectedPosition.stopped(p0.head()); | 235 | // TODO: make this clearer |
236 | return GameState.pathToNextCentralPosition(p0).concat(Player.DirectedPosition.stopped(new Player.DirectedPosition(GameState.nextCentralPosition(p0), p0.head().direction()))); | ||
236 | 237 | ||
237 | if (p0.head().direction().isPerpendicularTo(newDir.get())) | 238 | if (p0.head().direction().isPerpendicularTo(newDir.get())) |
238 | return GameState.pivotPath(Player.DirectedPosition.moving(p0.head()), newDir.get()); | 239 | return GameState.pivotPath(Player.DirectedPosition.moving(p0.head()), newDir.get()); |