// LISA CALLBACK ET KA TEISTE MÄNGIJATE OTHERPLAYERS VÄÄRTUSTATAKS public void addPlayersToGame(int gameid, ServiceUser[] pl) { Game g = listOfGames.ElementAt(gameid - 1); //add users to game players array foreach (ServiceUser p in pl) { int index = g.Count; g.Players[index] = p; g.Count = g.Count + 1; } foreach (ServiceUser u in g.Players) { if (u != null) { Subscriber s = getSubscriberById(u.Id); IServiceCallback cb = s.callback; cb.OnPlayersAdded(gameid, g.Players); } } }