public void pickUp(int gameId) { Game g = listOfGames.ElementAt(gameId - 1); g.PickedUp = true; g.Players[g.HitsIndex].CardsInHand += g.NrOfCardsOnTable; g.NrOfCardsOnTable = 0; setNextMoveAndHitId(gameId); for (int i = 0; i < g.Count; i++) { Subscriber s = getSubscriberById(g.Players[i].Id); IServiceCallback cb = s.callback; cb.OnPickUp(gameId, g.Players[g.HitsIndex].Id); } if (!isGameOver(gameId)) { for (int i = 0; i < g.Count; i++) { Subscriber s = getSubscriberById(g.Players[i].Id); IServiceCallback cb = s.callback; cb.OnRoundOver(gameId, g.Players[g.MovesIndex].Id, g.Players[g.HitsIndex].Id); } } else { for (int i = 0; i < g.Count; i++) { Subscriber s = getSubscriberById(g.Players[i].Id); IServiceCallback cb = s.callback; cb.OnGameOver(gameId, g.Players[g.HitsIndex].Id); } } }