private void HandleGoalsThisSecond(IList <PlayEvent> eventsThatStartThisSecond, int second) { foreach (var playEvent in eventsThatStartThisSecond.Goals()) { if (playEvent.IsGoal) { _scoreBoard.AddGoal(playEvent.HomeTeam); _homeTeamAdvantage = _scoreBoard.HomeTeamAdvantage; } Log(playEvent, second); if (playEvent.IsPowerPlayGoal) { _penaltyBox.HandlePowerPlayGoal(playEvent); } } }
public void OneZeroShouldBeOneUp() { _scoreBoard.AddGoal(true); Assert.AreEqual(TeamAdvantage.OneUp, _scoreBoard.HomeTeamAdvantage); }