public void run() {
		blocks.add(new Block(50, 50, 0xff00ff));

		for (int y = 0; y < 50; y++) {
			for (int x = 0; x < 50; x++) {
				blocks.add(new Block(25 + x * 25, 25 + y * 25, random.nextInt(0xff)));
			}
		}

//		blocks.add(new Block(250, 250, random.nextInt(0xff)));

//		Arrays.binarySearch(blocks.toArray(), blocks.get(0));

		long lastTime = System.nanoTime();
		double ns = 1000000000.0 / 60.0;
		double delta = 0;
		long timer = System.currentTimeMillis();
		int updates = 0;
		int frames = 0;
		while (running) {
			long now = System.nanoTime();
			delta += (now - lastTime) / ns;
			lastTime = now;
			if (delta >= 1) {
				updates++;
				if (input.keys[KeyEvent.VK_ESCAPE]) running = false;
				update();
				delta--;
			}
			render();
			frames++;
			if (System.currentTimeMillis() - timer > 1000) {
				timer += 1000;
				System.out.println(updates + "ups, " + frames + " fps");
				updates = 0;
				frames = 0;
			}
		}
	}