[ADD] added get lobby for users method

This commit is contained in:
Sem van der Hoeven
2020-10-21 20:42:00 +02:00
parent 3a13314519
commit 95448832c3
2 changed files with 12 additions and 3 deletions

View File

@@ -121,6 +121,18 @@ namespace Server.Models
}
}
public Lobby GetLobbyForUser(User user)
{
foreach (Lobby l in lobbies)
{
if (l.Users.Contains(user))
{
return l;
}
}
return null;
}
public void AddToLobby(Lobby lobby, User user)
{
foreach (Lobby l in lobbies)