!7 !include #1006891 // AI Game & API p { pGame(); } ////////////////////////////////////// // Test AIs. Just add your own here // ////////////////////////////////////// !include #1006893 // ClickAnyBLOB !include #1006892 // MemorizeBrightBLOB !include #1006905 // MemorizeBrightBLOB2 ////////////////// // PUZZLE MAKER // ////////////////// static L mainImages; static Puzzle makePuzzle() { if (mainImages == null) mainImages = loadImages(#1006879, #1006889, #1006895); L solutions = ll( pointsRect(522, 162, 540, 179), pointsRect(449, 70, 466, 84), null); // select image int i = random(l(mainImages)); RGBImage mainImage = mainImages.get(i); Rect solution = solutions.get(i); Rect clip; if (solution != null) { // select random portion clip = selectRandomPartContaining(mainImage, solution, w, h); solution = translateRect(solution, -clip.x, -clip.y); } else clip = selectRandomPart(mainImage, w, h); RGBImage img = mainImage.clip(clip); // return puzzle ret new Puzzle("Close the window:", "I see no window", img, llNonNulls(solution)); }