public WinMineSweeper() {
    super();
    try {
      robot = new Robot();
      screensize = Toolkit.getDefaultToolkit().getScreenSize();
      smiley = loadSmiley();
      addType("unknown", unknown);
      addType("empty", empty);
      addType("1", one);
      addType("2", two);
      addType("3", three);
      addType("4", four);
      addType("5", five);
      addType("6", six);
      addType("7", seven);
      addType("8", eight);
      addType("flag", mine);
      addType("mine", mineaff);
      addType("minerouge", mineaff);

      final Process process = Runtime.getRuntime().exec("winmine.exe");
      new Thread() {
        @Override
        public void run() {
          try {
            process.waitFor();
            System.out.println("WINMINE ferm�");
            winmineclosed = true;
          } catch (Exception e) {
            e.printStackTrace();
          }
        }
      }.start();

      int i = 0;
      Point p;
      do {
        try {
          Thread.sleep(500);
        } catch (InterruptedException e) {
          // don't care
        }
        robot.keyPress(KeyEvent.VK_ALT);
        robot.keyPress(KeyEvent.VK_P);
        robot.keyRelease(KeyEvent.VK_P);
        robot.keyPress(KeyEvent.VK_E);
        robot.keyRelease(KeyEvent.VK_E);
        robot.keyRelease(KeyEvent.VK_ALT);
        p = findSmiley();
      } while (p.x == 0 && p.y == 0 && i++ < 10);
      if (p.x == 0 && p.y == 0) {
        throw new RuntimeException("winmine not found");
      }
      ox = p.x - 230;
      oy = p.y + 37;

    } catch (IOException e) {
      throw new RuntimeException(e);
    } catch (AWTException e) {
      throw new RuntimeException(e);
    }
  }