public PredictionController(IUnitOfWork uow, IUserPrediction userprediction, IUser user, IMatchScore matchscore) { _uow = uow; _userPrediction = userprediction; _User = user; _matchscore = matchscore; }
public ClientAreaController(IUnitOfWork uow, IMatch match, IGroup group, IPartInGroup partGroup, IpartInMatch partInMatch, IUserPrediction userprediction, IUser user, IMatchScore matchscore, ITournament tournament) { _uow = uow; _match = match; _Group = group; _partInGroup = partGroup; _partInMatch = partInMatch; _userPrediction = userprediction; _User = user; _matchscore = matchscore; _tournament = tournament; }
private void VerifyMatchScore(IEnumerable <EngineTick> allTicks, IMatchScore score, Func <FighterTick, bool> actorQuery, Func <FighterAttackTick, bool> targetQuery, Func <FighterConditionDamageTick, bool> conditionSourceQuery) { var fighterTicks = allTicks .OfType <FighterTick>() .Where(actorQuery); var expectedDamage = fighterTicks.OfType <FighterAttackTick>().Where(o => o.Hit).Sum(o => o.Damage); var expectedConditionDamage = allTicks.OfType <FighterConditionDamageTick>().Where(conditionSourceQuery).Sum(o => o.Damage); Assert.Equal(fighterTicks.OfType <FighterMoveTick>().Sum(o => o.Current.GetDistance(o.Next)), score.TotalDistanceTraveled, 2); Assert.Equal(expectedDamage + expectedConditionDamage, score.TotalDamageDone); Assert.Equal(allTicks.OfType <FighterAttackTick>().Where(targetQuery).Where(o => o.Hit).Sum(o => o.Damage), score.TotalDamageTaken); Assert.Equal(fighterTicks.OfType <EngineFighterDiedTick>().Count(), score.TotalDeaths); }
public MatchScoreController(IUnitOfWork uow, IMatchScore matchscore, IMatch match) { _uow = uow; _MatchScore = matchscore; _Match = match; }