private CardPlayer player2; // player2 assumed to be AI #endregion Fields #region Methods private void SetupGame() { cardGame = new CardGame (); if (typeOfPlayer1 == PlayerType.Blind) { player1 = new CardPlayerBlind (cardGame, player1IsAI, 0); } else if (typeOfPlayer1 == PlayerType.Reflect) { player1 = new CardPlayerReflect (cardGame, player1IsAI, 0); } else if (typeOfPlayer1 == PlayerType.Mutation) { player1 = new CardPlayerMutation (cardGame, player1IsAI, 0); } if (typeOfPlayer2 == PlayerType.Blind) { player2 = new CardPlayerBlind(cardGame, player2IsAI, 0); } else if (typeOfPlayer2 == PlayerType.Reflect) { player2 = new CardPlayerReflect (cardGame, player2IsAI, 0); } else if (typeOfPlayer2 == PlayerType.Mutation) { player2 = new CardPlayerMutation (cardGame, player2IsAI, 0); } cardGame.InitializeData (player1, player2); }
/************************************************************************ * Game State Transition Methods ************************************************************************/ private void SetupGame() { cardGame = new CardGame (); player1 = new CardPlayerReflect (cardGame, false); player2 = new CardPlayerMutation (cardGame, true); cardGame.InitializeData (player1, player2); }