Use 0 instead of null to represent empty tile