private void getInput() {
        while(true) {
            System.out.println("input move>");
            Scanner s = new Scanner(System.in);
            String input = s.next();
            if(input.matches("[0-9]+,[0-9]+")) {
                int x = Integer.parseInt(input.split(",")[0]);
                int y = Integer.parseInt(input.split(",")[1]);
                if(x >= 0 && x < engine.getWidth() &&
                   y >= 0 && y < engine.getHeight() ) {
                    System.out.println("uncovering x=" + x + ",y=" + y);
                    engine.uncoverSquare(x, y);
                    if(!engine.isGameOver()) {
                        update();
                    }
                    break;
                }
            }
            else if(input.startsWith("q")) {
                System.exit(0);
            }
            System.out.println("format=x,y\n"
                    + "q to quit\n"
                    + "coordinates are 0 based and must be on the board");
        }
    }