Updated Placing Tiles Logic