public void run() { MOVE_PREV = MOVE_DOWN; System.out.println("INIT!"); map = new int[mapX][mapY]; for (int i = 0; i < map.length; i++) { for (int j = 0; j < map[i].length; j++) { map[i][j] = 0; } } map[blockP.x][blockP.y] = 1; // map[0][20] = 1; StdDraw.setXscale(-1.0, 1.0); StdDraw.setYscale(-1.0, 1.0); // initial values // double vx = 0.015, vy = 0.023; // velocity // main animation loop while (true) { drawGame(); try { Thread.sleep(100); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } movePrev(); } }