private void BeginGame(PlayerNamesModel model) { bool player1Computer = String.IsNullOrWhiteSpace(model.Player1Name); bool player2Computer = String.IsNullOrWhiteSpace(model.Player2Name); _game = new Game(player1Computer ? "Computer" : model.Player1Name, player2Computer ? "Computer" : model.Player2Name, new DraughtsPlayer(), player1Computer, player2Computer); }
public ActionResult PlayerNames(PlayerNamesModel model) { BeginGame(model); return(RedirectToAction("DisplayBoard")); }