[gnome-games/applygsoc2009: 76/76] -- Can choose difficulty when starting network game



commit 9bd7baad6b7e8f50c7238bcd2056efbf975f04fd
Author: Pablo Castellano <pablog src gnome org>
Date:   Wed Sep 1 05:38:50 2010 +0200

    -- Can choose difficulty when starting network game

 gnome-sudoku/src/lib/main.py |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 96cd592..97561fb 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -40,7 +40,6 @@ class SudokuGame (gconf_wrapper.GConfWrapper):
     initial_prefs = {'group_size':9,
                      'always_show_hints':False,
                      'difficulty':0.0,
-					 'game-level': 'easy',
                      'minimum_number_of_new_puzzles':MIN_NEW_PUZZLES,
                      'highlight':False,
                      'bg_color':'black',
@@ -105,9 +104,7 @@ class SudokuGame (gconf_wrapper.GConfWrapper):
             logger.debug("no saved game found")
             return None
 
-    def _generate_new_puzzle(self):
-        # TODO should use preconfigured or user-selected level
-        level = self.gconf['game-level']
+    def _generate_new_puzzle(self, level="easy"):
         # new_puzzle is a list, with the form of (<puzzle>, <difficulty>)
         puzzles = self.sudoku_maker.get_puzzles(1, [level])
         if puzzles:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]