Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public ActionResult PlayerNames(PlayerNamesModel model)
 {
     BeginGame(model);
     return(RedirectToAction("DisplayBoard"));
 }