diff --git a/FlufflParty/Assets/Scripts/Start/StartHandler.cs b/FlufflParty/Assets/Scripts/Start/StartHandler.cs index 70ac5c9..29eec0c 100644 --- a/FlufflParty/Assets/Scripts/Start/StartHandler.cs +++ b/FlufflParty/Assets/Scripts/Start/StartHandler.cs @@ -94,15 +94,18 @@ public class StartHandler : MonoBehaviour Stream stream = client.GetStream(); byte[] readMessage = new byte[10]; - stream.Write(new byte[]{4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}); + stream.Write(new byte[]{4, 0, 0, 0, 0, 0, 0, 0, 0, 0}); stream.Read(readMessage, 0, 10); string s = Encoding.ASCII.GetString(readMessage); + Debug.Log(s); PlayerPrefs.SetString("roomcode", s); PlayerPrefs.Save(); SceneManager.LoadScene(1, LoadSceneMode.Single); + + stream.Close(); } public void ButtonJoin() diff --git a/Server/.idea/workspace.xml b/Server/.idea/workspace.xml index 88488c7..ca4da1d 100644 --- a/Server/.idea/workspace.xml +++ b/Server/.idea/workspace.xml @@ -98,7 +98,7 @@ - + diff --git a/Server/out/artifacts/Server_jar/Server.jar b/Server/out/artifacts/Server_jar/Server.jar index 63763aa..687d673 100644 Binary files a/Server/out/artifacts/Server_jar/Server.jar and b/Server/out/artifacts/Server_jar/Server.jar differ diff --git a/Server/out/production/Server/Room$1.class b/Server/out/production/Server/Room$1.class index 18ebc82..bd67695 100644 Binary files a/Server/out/production/Server/Room$1.class and b/Server/out/production/Server/Room$1.class differ diff --git a/Server/out/production/Server/Room.class b/Server/out/production/Server/Room.class index 9696510..ab1f31b 100644 Binary files a/Server/out/production/Server/Room.class and b/Server/out/production/Server/Room.class differ diff --git a/Server/out/production/Server/Server$1.class b/Server/out/production/Server/Server$1.class index 8a221e2..f0e2458 100644 Binary files a/Server/out/production/Server/Server$1.class and b/Server/out/production/Server/Server$1.class differ diff --git a/Server/out/production/Server/Server.class b/Server/out/production/Server/Server.class index b176a3c..1a48e3b 100644 Binary files a/Server/out/production/Server/Server.class and b/Server/out/production/Server/Server.class differ diff --git a/Server/src/Server.java b/Server/src/Server.java index 5008fbc..34e02c0 100644 --- a/Server/src/Server.java +++ b/Server/src/Server.java @@ -179,6 +179,7 @@ public class Server byte[] tempRoomCode = generateRoomCode(); Room tempRoom = new Room(new String(tempRoomCode, StandardCharsets.US_ASCII), server); publicRooms.add(tempRoom); + rooms.put(new String(tempRoomCode, StandardCharsets.US_ASCII), tempRoom); output.write(tempRoomCode); System.out.println("Room " + new String(tempRoomCode, StandardCharsets.US_ASCII) + " successfully created!");