public void Update(GameTime gameTime)
        {
            CardPile.Update(gameTime);
            foreach (Player player in Players)
            {
                player.Update(gameTime);
            }
            String response = networkThread.GetLatestMessage();

            if (response != null)
            {
                if (response.StartsWith("NEW_PLAYER"))
                {
                    AddPlayer(MessageParser.ToPlayerUsername(response));
                    PlayerJoined(Players.ElementAt(Players.Count - 1));
                }
                else if (response.StartsWith("REMOVE_PLAYER"))
                {
                    String username = MessageParser.ToReceivedPlayer(response);
                    Player player   = GetPlayerFromName(username);
                    Players.Remove(player);
                }
                else if (response.StartsWith("PLAYER_WON"))
                {
                    PlayerWinner();
                }
                else if (response.StartsWith("PLAYER_RECEIVE_CARD"))
                {
                    String username = MessageParser.ToReceivedPlayer(response);
                    Card   card     = MessageParser.ToPlayerReceivedCard(response);
                    Deck.DrawCard();
                    card.SetOriginPosition(Deck.Position.X, Deck.Position.Y, false);
                    Player player = GetPlayerFromName(username);
                    if (player != null)
                    {
                        if (CurrentPlayState == PlayState.DEAL)
                        {
                            if (player.HandCardCount() < 3)
                            {
                                player.AddHandCards(card);
                            }
                            else if (player.TableFlippedCardCount() < 3)
                            {
                                player.AddTableFlippedCards(card);
                            }
                            else
                            {
                                player.AddTableCards(card);
                            }
                        }
                        else
                        {
                            player.AddHandCards(card);
                        }
                    }
                }
                else if (response.StartsWith("PLAY_STATE"))
                {
                    CurrentPlayState = MessageParser.ToPlayState(response);
                    if (CurrentPlayState == PlayState.SWAP)
                    {
                        SwapState();
                    }
                }
                else if (response.StartsWith("PLAYER_SWAP_CARD"))
                {
                    String username = MessageParser.ToReceivedPlayer(response);
                    Player player   = GetPlayerFromName(username);
                    if (player != null)
                    {
                        Card handCard  = player.GetCard(MessageParser.ToPlayerSwappedHandCard(response));
                        Card tableCard = player.GetCard(MessageParser.ToPlayerSwappedTableCard(response));
                        player.RemoveCard(handCard);
                        player.RemoveCard(tableCard);
                        player.AddHandCards(tableCard);
                        player.AddTableCards(handCard);
                    }
                }
                else if (response.StartsWith("PLAYER_TURN"))
                {
                    String username = MessageParser.ToReceivedPlayer(response);
                    CurrentPlayer = GetPlayerFromName(username);
                    NewTurn();
                }
                else if (response.StartsWith("FIRST_CARD"))
                {
                    Deck.DrawCard();
                    Card card = MessageParser.ToFirstCard(response);
                    card.SetOriginPosition(Deck.Position.X, Deck.Position.Y, false);
                    CardPile.AddCard(card);
                }
                else if (response.StartsWith("FLIPPED_PILE"))
                {
                    CardPile.FlipPile();
                    FlippedPile();
                }
                else if (response.StartsWith("CARDS_PLAYED"))
                {
                    Player      player   = GetPlayerFromName(MessageParser.ToReceivedPlayer(response));
                    Card[]      cards    = MessageParser.ToCardsPlayed(response);
                    List <Card> newCards = new List <Card>();
                    foreach (Card card in cards)
                    {
                        Card newCard = player.GetCard(card);
                        newCards.Add(newCard);
                    }
                    AddPlayedCards(player, newCards.ToArray());
                }
                else if (response.StartsWith("TRIED_FROM_DECK"))
                {
                    Deck.DrawCard();
                    Card card = MessageParser.ToFirstCard(response);
                    card.SetOriginPosition(Deck.Position.X, Deck.Position.Y, false);
                    CurrentPlayer.AddHandCards(card);
                }
                else if (response.StartsWith("PICKUP_CARDS"))
                {
                    Card[]      cards    = MessageParser.ToCardsPlayed(response);
                    List <Card> newCards = new List <Card>();
                    foreach (Card card in cards)
                    {
                        card.SetOriginPosition(CardPile.Position.X, CardPile.Position.Y, false);
                    }
                    CurrentPlayer.AddHandCards(cards);
                    CardPile.Pile.Clear();
                }
                else if (response.StartsWith("RECEIVE_CARD_DECK"))
                {
                    Deck.DrawCard();
                    Card card = MessageParser.ToFirstCard(response);
                    card.SetOriginPosition(Deck.Position.X, Deck.Position.Y, false);
                    CurrentPlayer.AddHandCards(card);
                }
                else if (response.StartsWith("TRIED_CARD"))
                {
                    Deck.DrawCard();
                    Card card    = MessageParser.ToFirstCard(response);
                    Card newCard = CurrentPlayer.GetCard(card);
                    CurrentPlayer.RemoveCard(newCard);
                    CurrentPlayer.AddHandCards(newCard);
                    PlayedCards(new Card[] { newCard });
                }
            }
            if (CurrentPlayState == PlayState.SWAP)
            {
                foreach (Player player in Players)
                {
                    if (player is LocalPlayer)
                    {
                        PlayerAction action = player.HandleInput(gameTime, this);
                        if (action != null)
                        {
                            networkThread.SendMessage(MessageParser.PlayerActionToString(action));
                        }
                    }
                }
            }
            else if (CurrentPlayState == PlayState.PLAY)
            {
                bool isLocalPlayer = false;
                if (CurrentPlayer is LocalPlayer)
                {
                    isLocalPlayer = true;
                    PlayerAction action = CurrentPlayer.HandleInput(gameTime, this);
                    if (action != null)
                    {
                        networkThread.SendMessage(MessageParser.PlayerActionToString(action));
                    }
                }
                if (!isLocalPlayer)
                {
                    foreach (Card card in GameCursor.SelectedCards)
                    {
                        card.ResetPosition();
                    }
                    GameCursor.SelectedCards.Clear();
                }
            }
        }