aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/Client/Client.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/scalevalapokalypsi/Client/Client.scala')
-rw-r--r--src/scalevalapokalypsi/Client/Client.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/scalevalapokalypsi/Client/Client.scala b/src/scalevalapokalypsi/Client/Client.scala
index 5364405..1ca4e7e 100644
--- a/src/scalevalapokalypsi/Client/Client.scala
+++ b/src/scalevalapokalypsi/Client/Client.scala
@@ -189,7 +189,11 @@ class Client(socket: Socket):
this.serverLineState = ServerLineState.Directions
case ServerLineState.Directions =>
- this.turnInfo.possibleDirections = line.split(LIST_SEPARATOR)
+ val dirs = line.split(LIST_SEPARATOR)
+ if dirs(0) == "" && dirs.length == 1 then
+ this.turnInfo.possibleDirections = Array.empty
+ else
+ this.turnInfo.possibleDirections = dirs
this.serverLineState = ServerLineState.Items
case ServerLineState.Items =>