X and y are set to the closing square