Tried to fix build by removing invalid '>' char.

#story[1246]
This commit is contained in:
Kusal Ekanayake
2017-09-05 18:17:20 +12:00
parent 488ab47c8d
commit 302bc91461
4 changed files with 8 additions and 8 deletions
@@ -388,7 +388,7 @@ public class ServerToClientThread implements Runnable, Observer {
String[] words = chatterText.split("\\s+"); String[] words = chatterText.split("\\s+");
if (words.length > 2 && isHost) { if (words.length > 2 && isHost) {
switch (words[2].trim()) { switch (words[2].trim()) {
case ">speed": case "/speed":
try { try {
GameState.setSpeedMultiplier(Double.valueOf(words[3])); GameState.setSpeedMultiplier(Double.valueOf(words[3]));
GameState.broadcastChatter(new ChatterMessage( GameState.broadcastChatter(new ChatterMessage(
@@ -399,7 +399,7 @@ public class ServerToClientThread implements Runnable, Observer {
logger.error("cannot parse >speed value"); logger.error("cannot parse >speed value");
} }
return; return;
case ">finish": case "/finish":
GameState.broadcastChatter(new ChatterMessage( GameState.broadcastChatter(new ChatterMessage(
chatterPayload[1], chatterPayload[1],
"SERVER: Game will now finish" "SERVER: Game will now finish"
@@ -1 +0,0 @@
Feature: Sending chatter packets over the web.
@@ -65,7 +65,7 @@ public class ChatCommandsTest {
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
ie.printStackTrace(); ie.printStackTrace();
} }
host.sendChatterMessage("[time_prefix] <name_prefix> >finish"); host.sendChatterMessage("[time_prefix] <name_prefix> /finish");
dcSent = true; dcSent = true;
try { try {
Thread.sleep(2000); Thread.sleep(2000);
@@ -101,7 +101,7 @@ public class ChatCommandsTest {
ie.printStackTrace(); ie.printStackTrace();
} }
mst.startGame(); mst.startGame();
host.sendChatterMessage("[time_prefix] <name_prefix> >speed 5.0"); host.sendChatterMessage("[time_prefix] <name_prefix> /speed 5.0");
try { try {
Thread.sleep(100); Thread.sleep(100);
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
@@ -142,7 +142,7 @@ public class ChatCommandsTest {
ie.printStackTrace(); ie.printStackTrace();
} }
mst.startGame(); mst.startGame();
host.sendChatterMessage("[time_prefix] <name_prefix> >speed fdgdgdfg"); host.sendChatterMessage("[time_prefix] <name_prefix> /speed fdgdgdfg");
try { try {
Thread.sleep(100); Thread.sleep(100);
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
@@ -190,7 +190,7 @@ public class ChatCommandsTest {
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
ie.printStackTrace(); ie.printStackTrace();
} }
client.sendChatterMessage("[time_prefix] <name_prefix> >speed 5.0"); client.sendChatterMessage("[time_prefix] <name_prefix> /speed 5.0");
try { try {
Thread.sleep(200); Thread.sleep(200);
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
@@ -264,7 +264,7 @@ public class ChatCommandsTest {
// } catch (InterruptedException ie) { // } catch (InterruptedException ie) {
// ie.printStackTrace(); // ie.printStackTrace();
// } // }
host.sendChatterMessage("[time_prefix] <name_prefix> >finish"); host.sendChatterMessage("[time_prefix] <name_prefix> /finish");
dcSent = true; dcSent = true;
// try { // try {
// Thread.sleep(200); // Thread.sleep(200);
@@ -21,6 +21,7 @@ public class YachtTest {
@BeforeClass @BeforeClass
public static void setUp() { public static void setUp() {
new GameState("localhost");
y1 = new ServerYacht("Yacht", 1, "Y1", "Y1", "Yacht 1", "C1"); y1 = new ServerYacht("Yacht", 1, "Y1", "Y1", "Yacht 1", "C1");
gs = new GameState("localhost"); gs = new GameState("localhost");
} }