- Fixed Null Pointer

- Build Should pass

Tags: #story[1245]
This commit is contained in:
Alistair McIntyre
2017-09-14 15:10:48 +12:00
parent cc124b2d19
commit 482d987839
3 changed files with 7 additions and 8 deletions
@@ -341,10 +341,10 @@ public class GameClient {
}
if (raceFinished) {
System.out.println(raceViewController);
raceViewController.showFinishDialog(finishedBoats);
Sounds.playFinishSound();
close();
ViewManager.getInstance().getGameClient().stopGame();
//loadFinishScreenView();
}
raceState.setRaceFinished();
@@ -450,7 +450,7 @@ public class GameClient {
if (server != null) server.terminate();
if (socketThread != null) socketThread.setSocketToClose();
server = null;
socketThread = null;
// socketThread = null;
}
public Map<Integer, ClientYacht> getAllBoatsMap() {
@@ -200,7 +200,6 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
public void showFinishDialog(ArrayList<ClientYacht> finishedBoats) {
raceState.setRaceStarted(false);
finishDialogController.setFinishedBoats(finishedBoats);
ViewManager.getInstance().getGameClient().stopGame();
finishScreenDialog.show();
}
@@ -61,7 +61,7 @@ public class ChatCommandsTest {
} catch (InterruptedException ie) {
ie.printStackTrace();
}
host.sendChatterMessage("[time_prefix] <name_prefix> >finish");
host.sendChatterMessage("[time_prefix] <name_prefix> /finish");
dcSent = true;
try {
Thread.sleep(2000);
@@ -104,7 +104,7 @@ public class ChatCommandsTest {
ie.printStackTrace();
}
mst.startGame();
host.sendChatterMessage("[time_prefix] <name_prefix> >speed 5");
host.sendChatterMessage("[time_prefix] <name_prefix> /speed 5");
try {
Thread.sleep(100);
} catch (InterruptedException ie) {
@@ -143,7 +143,7 @@ public class ChatCommandsTest {
ie.printStackTrace();
}
mst.startGame();
host.sendChatterMessage("[time_prefix] <name_prefix> >speed fdgdgdfg");
host.sendChatterMessage("[time_prefix] <name_prefix> /speed fdgdgdfg");
try {
Thread.sleep(100);
} catch (InterruptedException ie) {
@@ -188,7 +188,7 @@ public class ChatCommandsTest {
} catch (InterruptedException ie) {
ie.printStackTrace();
}
client.sendChatterMessage("[time_prefix] <name_prefix> >speed 5.0");
client.sendChatterMessage("[time_prefix] <name_prefix> /speed 5.0");
try {
Thread.sleep(200);
} catch (InterruptedException ie) {
@@ -248,7 +248,7 @@ public class ChatCommandsTest {
} catch (IOException ioe) {
ioe.printStackTrace();
}
host.sendChatterMessage("[time_prefix] <name_prefix> >finish");
host.sendChatterMessage("[time_prefix] <name_prefix> /finish");
dcSent = true;
}
}