+ if pos not in self._gates:
+ self._gates[pos] = -1 # down
+ image = load_image('tiles/gate_down.png')
+ else:
+ state = self._gates[pos]
+ if state == -1:
+ image = load_image('tiles/gate_down.png')
+ elif state == 0:
+ # destroyed
+ image = load_image('tiles/floor.png')
+ elif state == 1:
+ # badly damaged
+ image = load_image('tiles/gate_dented.png')
+ elif state == 2:
+ # lightly damaged
+ image = load_image('tiles/gate_bent.png')
+ else:
+ # gate up
+ image = load_image('tiles/gate_up.png')