internal BatterInnings(TeamInnings teamInnings, Player batter) { if (teamInnings == null) throw new ArgumentNullException("teamInnings"); if (batter == null) throw new ArgumentNullException("batter"); this.teamInnings = teamInnings; this.batter = batter; notOut = true; startTime = DateTime.Now; }
internal Over(TeamInnings battingTeamInnings, Player bowler) { BattingTeamInnings = battingTeamInnings; Bowler = bowler; }
public virtual TeamInnings NewInnings(Team battingTeam) { if (battingTeam == null) throw new ArgumentNullException("battingTeam"); if (! (battingTeam.Equals(Team1) || battingTeam.Equals(Team2))) throw new InvalidOperationException("Team must be one of the teams in the match!"); TeamInnings teamInnings; if (battingTeam.Equals(Team1)) { teamInnings = new TeamInnings(Team1, Team2); } else { teamInnings = new TeamInnings(Team2, Team1); } innings.Add(teamInnings); return teamInnings; }
internal Over(TeamInnings battingTeamInnings, Player bowler) { this.battingTeamInnings = battingTeamInnings; this.bowler = bowler; }