}//Fight() private bool WhichClass(string playerWeapon, string otherWeapon) { //set the playerWin here bool playerWin = false; switch (playerWeapon) { case "rock": PlayerRock playerGameR = new PlayerRock(); playerWin = playerGameR.Act(otherWeapon); break; case "paper": PlayerPaper playerGameP = new PlayerPaper(); playerWin = playerGameP.Act(otherWeapon); break; case "scissors": PlayerScissors playerGameS = new PlayerScissors(); playerWin = playerGameS.Act(otherWeapon); break; default: break; } return(playerWin); } //WhichClass()
}//Fight() private bool WhichClass(string playerWeapon, string otherWeapon) { //set the playerWin here bool playerWin = false; switch (playerWeapon) { case "rock": PlayerRock playerGameR = new PlayerRock(); playerWin = playerGameR.Act(otherWeapon); break; case "paper": PlayerPaper playerGameP = new PlayerPaper(); playerWin = playerGameP.Act(otherWeapon); break; case "scissors": PlayerScissors playerGameS = new PlayerScissors(); playerWin = playerGameS.Act(otherWeapon); break; default: break; } return playerWin; }//WhichClass()