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())
     };
 }
Example #2
0
        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())
            };
        }
Example #3
0
 public ConsoleLoggingGame(IDartsGame game)
 {
     this.game = game;
 }
Example #4
0
 public void PrepareGame(IDartsGame game)
 {
     Game = game;
     CreatePlayers();
     CurrentPlayer = Players[0];
     GameInProgress = true;
     LastRound = false;
 }
Example #5
0
        public GameDriver(IDartsGame game)
        {
            if (game == null) throw new ArgumentNullException(nameof(game));

            this._game = game;
        }