// desktopRegion =
// capture.load("/Users/axet/Desktop//Screen Shot 2011-08-19 at 18.55.22.png",
// rectangle);
desktopRegion = capture.capture(rectangle);
frame.board.setImage(desktopRegion);
Recognition rr = new Recognition(desktopRegion);
RecognitionTable rtable = new RecognitionTable(rr, colorTable);
Matrix m = new Matrix(rtable);
frame.analyse.draw(colorTable, m);
SimpleAI a = new SimpleAI(m);
ArrayList<MoveMatrix> ppp = a.getMove();
int missClick = 10;
try {
for (MoveMatrix p : ppp) {
frame.analyse.move(p.p1, p.p2);
Rectangle mr = rr.getRect(p.p1.x, p.p1.y);
Point pp = rr.getMiddle(mr);
pp.x += rectangle.x;
pp.y += rectangle.y;
user.click(user.random(pp, missClick));
mr = rr.getRect(p.p2.x, p.p2.y);
pp = rr.getMiddle(mr);
pp.x += rectangle.x;
pp.y += rectangle.y;
user.click(user.random(pp, missClick));
}
} finally {