Draw grid lines for debug and update tile selection logic