Registering for Freerolls

These days the phlegmatic programmer participates in the National Headsup Poker Championship at Fulltilt Poker. They run lots of qualifiers. The good thing: these qualifiers are free, and they run every 3 minutes. The bad thing: there are only 180 entries in a first round qualifier, so you have to hit the button which registers you for the tournament basically as soon as it appears. Yep, these qualifier tournaments are filled within about 1 second.  Jesus.

Luckily, the phlegmatic programmer speaks Java. Here is his solution to the problem 🙂

package autoclick;

import java.awt.*;
import java.awt.event.InputEvent;

public class Main {

  public static void main(String[] args) throws Exception {
    int x = Integer.parseInt(args[0]);
    int y = Integer.parseInt(args[1]);
    Robot robot = new Robot();
    Color color = null;
    do {
      Color c = robot.getPixelColor(x, y);
      if (color == null) {
        color = c;
      } else {
        if (!color.equals(c)) {
          robot.mouseMove(x, y);
      try {
      } catch (Exception e) {}
    } while(true);



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: