public void AddNewUser(string userName, string connectionId) { var user = new User { Name = userName, RoomIn = "", ConnectionId = connectionId, RoomsWatching = new List<string>(), WatchingPasswords = new List<string>() }; _users.Add(userName, user); }
private string GetRoomPasswordForUser(User user, string roomName) { var index = user.RoomsWatching.IndexOf(roomName); return index >= 0 ? user.WatchingPasswords[index] : ""; }
public void DrawMove(User user, int x, int y) { _clients[user.RoomIn].PartnerDrawMove(user.Name, x, y); }
public void DrawStart(User user, string color, int thickness, int x, int y) { _clients[user.RoomIn].PartnerDrawStart(user.Name, color, thickness, x, y); }
public void DrawEnd(User user) { _clients[user.RoomIn].PartnerDrawEnd(user.Name); }