!7 !include #1006931 // AI Game & API p-autorestart { newImageText = "New Letter!"; gameTitle = "A. I. Game 8.6"; reproZoom = 1; makeInstruction(); pGame(); swing { clickButton(last(aiButtons)); // Start the winner AI! } } svoid makeInstruction { setInstruction("Reproduce this image with a single color:"); } sclass Submission { RGB color; *() {} *(RGB *color) {} } !include #1014964 // Random letter puzzle maker /////////////// // RENDERERS // /////////////// static RGBImage renderImage(Submission s) { ret new RGBImage(renderImage1(s)); } static BufferedImage renderImage1(Submission s) { ret newBufferedImage(w, h, toColor(s.color)); } static BufferedImage renderWithHints(Submission s) { ret renderImage1(s); } ///////////////////////////////// // AIs. Just add your own here // ///////////////////////////////// AI_Random_abstract > AI_Random { Submission guess() { ret Submission(randomColor()); } } AI_RandomWithVariation_abstract > AI_RandomWithVariation { AI_RandomWithVariation() { super(new AI_Random); } Submission vary(Submission s) { ret Submission(varyColor(s.color)); } } !include #1014957 // AI_Racer