merge Setup branch into develop #1

Merged
SemvdH merged 71 commits from setupBranch into master 2020-10-21 18:59:02 +00:00
2 changed files with 12 additions and 3 deletions
Showing only changes of commit 95448832c3 - Show all commits

View File

@@ -55,9 +55,6 @@ namespace Client
wantToBeHost = true; wantToBeHost = true;
wantToBeHostId = id; wantToBeHostId = id;
client.OnLobbiesReceivedAndWaitingForHost = hostLobbiesReceived; client.OnLobbiesReceivedAndWaitingForHost = hostLobbiesReceived;
// lobby id krijgen waarvan je host bent
// wachten totdat list van lobbies is gekomen
// uit die list de id zoeken en die joinen
} }

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) public void AddToLobby(Lobby lobby, User user)
{ {
foreach (Lobby l in lobbies) foreach (Lobby l in lobbies)