public GamePlayer(General playerContext) { this.playerContext = playerContext; handCards = new Dictionary<int,Card>(10); boardCards = new Dictionary<int,Card>(10); //TODO REMEMBER 10 (Should be a static value in a "config class orsmthing") }
/// <summary> /// Swaps out a client with another in the OnlinePlayers gameList /// </summary> public void SwapOutClient(General swapOut) { Player outP; // Gets the Player object OnlinePlayers.GetInstance().gameList.TryRemove(swapOut, out outP); OnlinePlayers.GetInstance().gameList.TryAdd(this, outP); // Update Contexts outP.gameContext = this; if (outP.gPlayer != null) { outP.gPlayer.playerContext = this; } Console.WriteLine("> [GENERAL] Swapped out the General Object!"); }