Exemple #1
0
 def _check_game_over(self):
     """Add score if the game is over."""
     if game.is_game_over(self.game_grid) and not self.submitted_score:
         self.submitted_score = True
         self.score_dialog.show_and_add_score(
             GLib.get_real_name(), int(time.time()), self.clicks,
             int(time.time() - self.start_time))
Exemple #2
0
 def test_is_game_over(self):
     self.assertFalse(game.is_game_over(self.g))
     for _x, _y, cell in self.g:
         cell.is_powered = True
     self.assertTrue(game.is_game_over(self.g))