Beispiel #1
0
 def handle_event(self, event):
     if events.is_move_left_event(event):
         self._selected_level = max(self._min_level,
                                    self._selected_level - 1)
     elif events.is_move_right_event(event):
         self._selected_level = min(self._max_level,
                                    self._selected_level + 1)
Beispiel #2
0
 def handle_event(self, event):
     if events.is_move_left_event(event):
         self._selected_players = max(self._min_players,
                                      self._selected_players - 1)
     elif events.is_move_right_event(event):
         self._selected_players = min(self._max_players,
                                      self._selected_players + 1)