public string Play_Game(GameMove playerMove, GameMove computerMove) { WinningMove winningMove = null; string result = "Player wins"; if (Is_Tie(playerMove, computerMove)) { return("Tie"); } //This section will need refactoring if (Is_Computer_Winner(computerMove, playerMove)) { result = "Player Loses"; winningMove = Get_Winning_Move(computerMove, playerMove); } else { winningMove = Get_Winning_Move(playerMove, computerMove); } return(Get_Winner_Text(winningMove, result)); }
private string Get_Winner_Text(WinningMove move, string result) { return($"{result}: {move}"); }