!7 !include #1006931 // AI Game & API p { pGame(); } sclass Submission { Pt a, b; *() {} *(Pt *a, Pt *b) {} } ////////////////// // PUZZLE MAKER // ////////////////// static RGBImage makeImage() { ret loadRGBImage(#1006930); } //////////////// // FORM MAKER // //////////////// static JComponent makeTheForm(GameForAI game) { JTextField x1 = jTextField("10"); JTextField y1 = jTextField("20"); JTextField x2 = jTextField("30"); JTextField y2 = jTextField("40"); ret makeForm(+x1, +y1, +x2, +y2, r { game.submit(new Submission(ptFromForm(x1, y1), ptFromForm(x2, y2))); }); } static Pt ptFromForm(JTextField x, JTextField y) { ret new Pt(intFromTextField(x), intFromTextField(y)); } ////////////// // RENDERER // ////////////// static RGBImage renderImage(Submission s) { BufferedImage bi = newBufferedImage(w, h, Color.white); drawRoundEdgeLine(bi, s.a, s.b, Color.red, 10); ret new RGBImage(bi); } ////////////////////////////////////// // Test AIs. Just add your own here // //////////////////////////////////////