public Set<Light> updateLights(int[][] board) {
		
		Random r = new Random();

		int count = 0;
		
		for (Light l : lights) {
			MoveableLight ml = (MoveableLight)l;
			
			if (l.getX() == lastLight.x && l.getY() == lastLight.y) {
				if (r.nextInt(2) == 0) ml.turnOff(); else ml.turnOn();
				continue;
			}
			

			// randomly move it in one direction
			// these methods return true if the move is allowed, false otherwise
			// a move is not allowed if it would go beyond the world boundaries
			// you can get the light's position with getX() and getY()
			switch (r.nextInt(4)) {
			case 0: ml.moveUp(); break;
			case 1: ml.moveDown(); break;
			case 2: ml.moveLeft(); break;
			case 3: ml.moveRight(); break;
			}

			// always leave the light on, unless you're near the collector
			double dx = l.getX() - collector.getX();
			double dy = l.getY() - collector.getY();
			double distance = Math.sqrt(dx*dx+dy*dy);
			if (distance < 20) ml.turnOff();
			else ml.turnOn();
		}
		
		return lights;
	}