change colour of a square on click if it is occupied