private void PlayRound(Player player) { for(int i = 0; i < 3; i++) { Dart dart = new Dart(Random); dart.Throw(); Score.CalculateScore(player, dart); } }
public void ThrowDarts() { for (int i = 1; i <= 6; i++) { Dart dart = new Dart(_random); if (i < 4) { dart.Throw(); this.player1.Score += Score.ComputeScore(dart); } else { dart.Throw(); this.player2.Score += Score.ComputeScore(dart); } } }
private int throwRound(Random random) { Dart DartThrow = new Dart(); int roundTotal = 0; for (int i = 0; i < 3; i++) { DartThrow.Throw(random); roundTotal += Score.calculateScore(DartThrow); } return(roundTotal); }
public static int CaluculationScore(Random random) { Dart dart = new Dart(random); dart.Throw(random); int rand1 = dart.RandomNumber; if (dart.Modifier == 1) return 50; else if (dart.Modifier == 2) return 25; else if (dart.Modifier == 3) return dart.Score *= 2; else if (dart.Modifier == 4) return dart.Score *= 3; else return dart.Score; }
public void PlayGame301() { currentPlayerScore = PlayerOneScore; currentTurn = 1; currentPlayerScoreString = PlayerOneGameScoreString; while (PlayerOneScore > 0 && PlayerTwoScore > 0) { for (int turns = 3; turns > 0; turns--) { dart.Throw(); currentTurn = Score301(dart.ThrowValue, dart.InnerOrOuterRing); currentPlayerScore -= currentTurn; currentPlayerScoreString += currentPlayerScore + " , "; currentTurn = 0; } switchPlayers(); } checkWinner(); }