private void ButtonOkClick(object sender, EventArgs e) { var to = Int16.Parse(comboBoxTo.SelectedItem.ToString()); var skip = checkBoxSkip.Checked; var joker = checkBoxJoker.Checked; CurrentGame = new AroundTheClock(to, skip, joker) { PlayerCount = Int16.Parse(comboBoxPlayerCount.SelectedItem.ToString()), InitialScore = Int16.Parse(comboBoxFrom.SelectedItem.ToString()) }; }
private void ButtonOkClick(object sender, EventArgs e) { var doubleIn = checkBoxDoubleIn.Checked; X01OutMode.OutMode outMode; if (radioButtonDoubleOut.Checked) { outMode = X01OutMode.OutMode.DoubleOut; } else if (radioButtonMasterOut.Checked) { outMode = X01OutMode.OutMode.MasterOut; } else { outMode = X01OutMode.OutMode.StraightOut; } CurrentGame = new X01(doubleIn, outMode) { PlayerCount = Int16.Parse(comboBoxPlayerCount.SelectedItem.ToString()), InitialScore = Int16.Parse(comboBoxScoreToBeginWith.SelectedItem.ToString()) }; }
public ConsoleLoggingGame(IDartsGame game) { this.game = game; }
public void PrepareGame(IDartsGame game) { Game = game; CreatePlayers(); CurrentPlayer = Players[0]; GameInProgress = true; LastRound = false; }
public GameDriver(IDartsGame game) { if (game == null) throw new ArgumentNullException(nameof(game)); this._game = game; }