@Test public void FoeBehindBotsTest() { for (ITrackedBot bot : wf.getTigerBotsVisible().values()) { IVector2 dir = Vector2.fromPoints(Geometry.getGoalOur().getCenter(), bot.getPos()); dir = dir.scaleToNew(Geometry.getBotRadius() + Geometry.getBallRadius()); IVector2 pos = bot.getPos().addNew(dir); double prob = MaxAngleKickRater.getFoeScoreChanceWithDefender(wf.getTigerBotsVisible().values(), pos); Assert.assertTrue(prob < 1e-3); } }
public static double getFoeScoreChanceWithDefender(final Collection<ITrackedBot> bots, final IVector2 origin) { Goal targetGoal = Geometry.getGoalOur(); if (isInTeamBot(bots, origin)) return 0; Optional<ValuePoint> target = getBestRatedDirectShotTarget(targetGoal, bots, origin); return target.map(ValuePoint::getValue).orElse(0.0); }
MaxAngleKickRater { public static double getFoeScoreChanceWithDefender(final Collection<ITrackedBot> bots, final IVector2 origin) { Goal targetGoal = Geometry.getGoalOur(); if (isInTeamBot(bots, origin)) return 0; Optional<ValuePoint> target = getBestRatedDirectShotTarget(targetGoal, bots, origin); return target.map(ValuePoint::getValue).orElse(0.0); } }
MaxAngleKickRater { public static double getFoeScoreChanceWithDefender(final Collection<ITrackedBot> bots, final IVector2 origin) { Goal targetGoal = Geometry.getGoalOur(); if (isInTeamBot(bots, origin)) return 0; Optional<ValuePoint> target = getBestRatedDirectShotTarget(targetGoal, bots, origin); return target.map(ValuePoint::getValue).orElse(0.0); } private  MaxAngleKickRater(); }
MaxAngleKickRater { public static double getFoeScoreChanceWithDefender(final Collection<ITrackedBot> bots, final IVector2 origin) { Goal targetGoal = Geometry.getGoalOur(); if (isInTeamBot(bots, origin)) return 0; Optional<ValuePoint> target = getBestRatedDirectShotTarget(targetGoal, bots, origin); return target.map(ValuePoint::getValue).orElse(0.0); } private  MaxAngleKickRater(); static double getDirectShootScoreChance(final Collection<ITrackedBot> bots, final IVector2 origin); static double getScoreChanceFromAngle(double angle); static double getFoeScoreChanceWithDefender(final Collection<ITrackedBot> bots, final IVector2 origin); static Optional<ValuePoint> getBestRatedDirectShotTarget(Goal targetGoal,
			Collection<ITrackedBot> obstacleBots, IVector2 origin); }
MaxAngleKickRater { public static double getFoeScoreChanceWithDefender(final Collection<ITrackedBot> bots, final IVector2 origin) { Goal targetGoal = Geometry.getGoalOur(); if (isInTeamBot(bots, origin)) return 0; Optional<ValuePoint> target = getBestRatedDirectShotTarget(targetGoal, bots, origin); return target.map(ValuePoint::getValue).orElse(0.0); } private  MaxAngleKickRater(); static double getDirectShootScoreChance(final Collection<ITrackedBot> bots, final IVector2 origin); static double getScoreChanceFromAngle(double angle); static double getFoeScoreChanceWithDefender(final Collection<ITrackedBot> bots, final IVector2 origin); static Optional<ValuePoint> getBestRatedDirectShotTarget(Goal targetGoal,
			Collection<ITrackedBot> obstacleBots, IVector2 origin);  }