@Test public void OurShortDistanceTest() { double biggestProb = 0; int testpoints = 8; IVector2 midpos = Geometry.getGoalTheir().getCenter(); for (int i = 0; i < testpoints - 1; i++) { double a = Math.PI / 2 + (i + 1) * (Math.PI / testpoints); IVector2 addvec = Vector2.fromAngle(a).scaleTo(Geometry.getPenaltyAreaDepth()); IVector2 testpos = midpos.addNew(addvec); double prob = MaxAngleKickRater.getDirectShootScoreChance(wf.getFoeBots().values(), testpos); biggestProb = Math.max(biggestProb, prob); } Assert.assertTrue(biggestProb > 0.9); }
public static double getDirectShootScoreChance(final Collection<ITrackedBot> bots, final IVector2 origin) { Goal targetGoal = Geometry.getGoalTheir(); if (isInTeamBot(bots, origin)) return 0; Optional<ValuePoint> target = getBestRatedDirectShotTarget(targetGoal, new ArrayList<>(bots), origin); return target.map(ValuePoint::getValue).orElse(0.0); }
MaxAngleKickRater { public static double getDirectShootScoreChance(final Collection<ITrackedBot> bots, final IVector2 origin) { Goal targetGoal = Geometry.getGoalTheir(); if (isInTeamBot(bots, origin)) return 0; Optional<ValuePoint> target = getBestRatedDirectShotTarget(targetGoal, new ArrayList<>(bots), origin); return target.map(ValuePoint::getValue).orElse(0.0); } }
MaxAngleKickRater { public static double getDirectShootScoreChance(final Collection<ITrackedBot> bots, final IVector2 origin) { Goal targetGoal = Geometry.getGoalTheir(); if (isInTeamBot(bots, origin)) return 0; Optional<ValuePoint> target = getBestRatedDirectShotTarget(targetGoal, new ArrayList<>(bots), origin); return target.map(ValuePoint::getValue).orElse(0.0); } private  MaxAngleKickRater(); }
MaxAngleKickRater { public static double getDirectShootScoreChance(final Collection<ITrackedBot> bots, final IVector2 origin) { Goal targetGoal = Geometry.getGoalTheir(); if (isInTeamBot(bots, origin)) return 0; Optional<ValuePoint> target = getBestRatedDirectShotTarget(targetGoal, new ArrayList<>(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 getDirectShootScoreChance(final Collection<ITrackedBot> bots, final IVector2 origin) { Goal targetGoal = Geometry.getGoalTheir(); if (isInTeamBot(bots, origin)) return 0; Optional<ValuePoint> target = getBestRatedDirectShotTarget(targetGoal, new ArrayList<>(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);  }