Noob needs help: Moving Units

This is pretty darn awesome. How do you know if a grid is occupied to make sure it doesn’t light up? I can’t figure that part out… Very very nice anyway!!