@Test @Ignore public void testBaseParser() throws IOException, BotException { File baseDir = new File(TestImageParser.class.getResource("/full_base_images").getFile()); int fail = 0; for (File f : baseDir.listFiles()) { System.out.println("processing " + f.getName()); BufferedImage src = ImageIO.read(f); boolean isFullActual = ImageParser.isCollectorFullBase(src); boolean isFullExpected = f.getName().startsWith("true"); try { Assert.assertEquals(isFullExpected, isFullActual); } catch (AssertionError e) { fail++; System.out.println(e.getMessage() + " for " + f.getName()); } } System.out.println("Full Collector Base Success Rate: " + (1 - (float)fail / baseDir.listFiles().length)); }
public static boolean isCollectorFullBase() throws BotException { return isCollectorFullBase(RobotUtils.screenShot(Area.ENEMY_BASE)); }
ImageParser { public static boolean isCollectorFullBase() throws BotException { return isCollectorFullBase(RobotUtils.screenShot(Area.ENEMY_BASE)); } }
ImageParser { public static boolean isCollectorFullBase() throws BotException { return isCollectorFullBase(RobotUtils.screenShot(Area.ENEMY_BASE)); }  }
ImageParser { public static boolean isCollectorFullBase() throws BotException { return isCollectorFullBase(RobotUtils.screenShot(Area.ENEMY_BASE)); }  static int parseGold(BufferedImage image); static int parseElixir(BufferedImage image); static int parseDarkElixir(BufferedImage image); static int[] parseTroopCount(); static int[] parseLoot(); static boolean isCollectorFullBase(); }
ImageParser { public static boolean isCollectorFullBase() throws BotException { return isCollectorFullBase(RobotUtils.screenShot(Area.ENEMY_BASE)); }  static int parseGold(BufferedImage image); static int parseElixir(BufferedImage image); static int parseDarkElixir(BufferedImage image); static int[] parseTroopCount(); static int[] parseLoot(); static boolean isCollectorFullBase();  }