mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Started making a cucumber test for allchat.
Will need to incorporate mockito in order to mock controller input. Have commented out the tests as they are not working correctly yet. #story[1246]
This commit is contained in:
@@ -303,7 +303,7 @@ public class ClientToServerThread implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
private void closeSocket() {
|
||||
public void closeSocket() {
|
||||
try {
|
||||
socket.close();
|
||||
socketOpen = false;
|
||||
|
||||
@@ -234,6 +234,7 @@ public class GameClient {
|
||||
|
||||
private void parsePackets() {
|
||||
while (socketThread.getPacketQueue().peek() != null) {
|
||||
System.out.println("PARSING PACKET");
|
||||
StreamPacket packet = socketThread.getPacketQueue().poll();
|
||||
switch (packet.getType()) {
|
||||
case RACE_STATUS:
|
||||
@@ -297,6 +298,8 @@ public class GameClient {
|
||||
case CHATTER_TEXT:
|
||||
Pair<Integer, String> playerIdMessagePair = StreamParser
|
||||
.extractChatterText(packet);
|
||||
|
||||
System.out.println("playerIdMessagePair = " + playerIdMessagePair);
|
||||
raceView.updateChatHistory(
|
||||
allBoatsMap.get(playerIdMessagePair.getKey()).getColour(),
|
||||
playerIdMessagePair.getValue()
|
||||
@@ -457,4 +460,9 @@ public class GameClient {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ClientToServerThread getSocketThread() {
|
||||
return socketThread;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user