[ADDED] a begin for the turn base

This commit is contained in:
Lars
2020-10-23 16:46:29 +02:00
parent eee4f0347f
commit 13cf0e44ee
7 changed files with 82 additions and 7 deletions

View File

@@ -298,8 +298,24 @@ namespace Server.Models
if (lobby.ID == lobbyID)
{
lobby.LobbyJoinable = false;
break;
}
}
}
public string FindUserNameInLobby(int lobbyID)
{
Lobby lobbyFound = null;
foreach (Lobby lobby in lobbies)
{
if (lobby.ID == lobbyID)
{
lobbyFound = lobby;
break;
}
}
return lobbyFound?.Users[lobbyFound.UserDrawing]?.Username;
}
}
}