[ADDED] a start for reading the random word from a file

This commit is contained in:
Dogukan
2020-10-22 01:37:59 +02:00
parent b08e6cc749
commit ef255e4828
4 changed files with 58 additions and 0 deletions

View File

@@ -178,6 +178,7 @@ namespace Server.Models
ServerCommunication.INSTANCE.JoinLobby(this.User,id);
sendMessage(JSONConvert.ConstructLobbyJoinSuccessMessage());
ServerCommunication.INSTANCE.sendToAll(JSONConvert.ConstructLobbyListMessage(ServerCommunication.INSTANCE.lobbies.ToArray()));
Debug.WriteLine("Random chosen word: {0}", JSONConvert.GetRandomWord(@"..\resources\WordsForGame.json"));
break;
case LobbyIdentifier.LEAVE:
id = JSONConvert.GetLobbyID(payload);