hard.add_callback('click', self.hard_game)
selector.add(hard)
+ y_offset += y_diff
+ very_hard = TextWidget(
+ (x_offset, y_offset), 'Very Hard', fontsize=32, colour='white',
+ centre=True)
+ very_hard.add_callback('click', self.very_hard_game)
+ selector.add(very_hard)
+
+ y_offset += y_diff
+ nintendo = TextWidget(
+ (x_offset, y_offset), 'NINTENDO Hard', fontsize=32, colour='white',
+ centre=True)
+ nintendo.add_callback('click', self.nintendo_hard_game)
+ selector.add(nintendo)
+
def easy_game(self, event):
self.start_game(GameState.new(max_health=5, wins_required=3))
def hard_game(self, event):
self.start_game(GameState.new(max_health=3, wins_required=5))
+ def very_hard_game(self, event):
+ self.start_game(GameState.new(max_health=2, wins_required=6))
+
+ def nintendo_hard_game(self, event):
+ self.start_game(GameState.new(max_health=1, wins_required=7))
+
def start_game(self, state):
from naja.scenes.game import GameScene
LoadGameEvent.post(state=state)