self.state.gameboard.change_mode()
InvalidateTheWorld.post()
return True
- if ev.key in (pgl.K_UP, pgl.K_w):
+ if ev.key in (pgl.K_UP, pgl.K_w, pgl.K_COMMA):
if self.chosen > 0:
self.chosen -= 1
InvalidateTheWorld.post()
return True
- if ev.key in (pgl.K_DOWN, pgl.K_s):
+ if ev.key in (pgl.K_DOWN, pgl.K_s, pgl.K_o):
if self.chosen + 1 < len(self.card.actions):
self.chosen += 1
InvalidateTheWorld.post()
if self.state.gameboard.player_mode == ACT:
return super(RobotWidget, self).handle_event(ev)
if ev.type == pgl.KEYDOWN:
- if ev.key in (pgl.K_UP, pgl.K_w):
+ if ev.key in (pgl.K_UP, pgl.K_w, pgl.K_COMMA):
if self.state.player.move(BITS.NORTH):
self.state.gameboard.change_mode()
InvalidateTheWorld.post()
return True
- if ev.key in (pgl.K_DOWN, pgl.K_s):
+ if ev.key in (pgl.K_DOWN, pgl.K_s, pgl.K_o):
if self.state.player.move(BITS.SOUTH):
self.state.gameboard.change_mode()
InvalidateTheWorld.post()
self.state.gameboard.change_mode()
InvalidateTheWorld.post()
return True
- if ev.key in (pgl.K_RIGHT, pgl.K_d):
+ if ev.key in (pgl.K_RIGHT, pgl.K_d, pgl.K_e):
if self.state.player.move(BITS.EAST):
self.state.gameboard.change_mode()
InvalidateTheWorld.post()
def handle_event(self, ev):
if ev.type == pgl.KEYDOWN:
- if ev.key in (pgl.K_DOWN, pgl.K_UP, pgl.K_s, pgl.K_w):
- if ev.key in (pgl.K_DOWN, pgl.K_s):
+ if ev.key in (pgl.K_DOWN, pgl.K_s, pgl.K_o,
+ pgl.K_UP, pgl.K_w, pgl.K_COMMA):
+ if ev.key in (pgl.K_DOWN, pgl.K_s, pgl.K_o):
self.position += 1
else:
self.position -= 1