// returns the cards for the given player public Card[] getPlayerHand(string playerName) { RealPlayer player = rotationOrders.Find(x => x.name.Equals(playerName)); if (player != null) { return(player.cards); } else { return(null); } }
// add a player to the game, the game has not started when // this function is called. public bool addPlayer(string playerName) { Player player = new RealPlayer(playerName); if (players.Count == 6) { return(false); } else if (!players.Contains(player)) { if (player is RealPlayer) { rotationOrders.Add((RealPlayer)player); } players.Add(player); return(true); } return(false); }