Added tile comparison and checking