public void ProcessTickForTeam(ITeam attacker, ITeam defender, IGameTeamStats attackerStats, IGameTeamStats defenderStats, Random random) { if (ShotOnNet(attacker, defender, random)) { attackerStats.Shots++; if (GoalScored(attacker, defender, random)) { attackerStats.Score++; } } }
public void AddStats(SeasonTeam team, IGameTeamStats stats, IGameTeamStats opponent) { team.GoalsFor += stats.Score; team.GoalsAgainst += opponent.Score; team.ShotsFor += stats.Shots; team.ShotsAgainst += opponent.Shots; if (opponent.Score < stats.Score) { team.Wins++; } else if (opponent.Score > stats.Score) { team.Loses++; } else { team.Ties++; } }
public Game(long?id, int gameNo, int day, int year, int period, ITeam home, IGameTeamStats homeStats, ITeam away, IGameTeamStats awayStats, bool isStarted, bool isComplete, bool canTie, int normalPeriods, int maxOverTimePeriods) { if (id != null) { Id = id.Value; } GameNo = gameNo; Day = day; Year = year; Period = period; Home = home; Away = away; IsStarted = isStarted; IsComplete = isComplete; CanTie = canTie; NormalPeriods = normalPeriods; MaxOverTimePeriods = maxOverTimePeriods; HomeStats = homeStats; AwayStats = awayStats; }