public PointsCounter(int bid, int scored, int pointsInPair, Enums.Colors color, bool afterGame, bool enemyAfterGame, Enums.Doubles doubles) { this.bid = bid; this.scored = scored; this.pointsInPair = pointsInPair; this.color = color; this.afterGame = afterGame; this.enemyAfterGame = enemyAfterGame; this.doubles = doubles; }
private void submit_Click(object sender, EventArgs e) { int bid = (int)bidBox.Value; int scored = (int)scoredBox.Value; int pointsInPair = (int)pairPointsBox.Value; Enums.Colors color = GetColor(colorBox.Text); Enums.Doubles doubles = GetRadioButtonsState(); int row = GetRow(); if (row == -1) { return; } Tuple <bool, bool> afterGames = GetAfterGameValues(row, whoBox.Text); PointsCounter counter = new PointsCounter(bid, scored, pointsInPair, color, afterGames.Item1, afterGames.Item2, doubles); int score = counter.Calculate(); PrintScore(score, row); }