diff options
author | Walter Bender <walter@walter-laptop.(none)> | 2010-01-07 19:44:21 (GMT) |
---|---|---|
committer | Walter Bender <walter@walter-laptop.(none)> | 2010-01-07 19:44:21 (GMT) |
commit | 6ae1af6d9454a62482ca9c4272a8136497aff427 (patch) | |
tree | 4bdd22fe9e1b731a5a78153a785ab863d44b61eb /visualmatch.py | |
parent | 5e587dc87a4a9316f9ed549885097f76e5d4c443 (diff) |
clean up
Diffstat (limited to 'visualmatch.py')
-rwxr-xr-x | visualmatch.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/visualmatch.py b/visualmatch.py index 8617c9d..92d4fb8 100755 --- a/visualmatch.py +++ b/visualmatch.py @@ -176,6 +176,8 @@ class VisualMatchMain: self.vmw.robot_time = 60 self.vmw.numberO = PRODUCT self.vmw.numberC = HASH + self.vmw.matches = 0 + self.vmw.robot_matches = 0 self.load_score() window.new_game(self.vmw, self.vmw.cardtype) @@ -184,17 +186,17 @@ class VisualMatchMain: try: f = file(os.path.join(os.path.abspath('.'), 'visualmatch.score'),"r") - s = f.read().split(":") + s = [f.read().split(":"),f.read().split(":")] f.close - self.vmw.low_score = int(s[1]) + self.vmw.low_score = (int(s[0]),int(s[1])) print "low score is: %d" % (self.vmw.low_score) except: - self.vmw.low_score = -1 + self.vmw.low_score = [-1,-1] def save_score(self): - print "saving low score: %d" % (int(self.vmw.low_score)) f = file(os.path.join(os.path.abspath('.'),'visualmatch.score'),"w") - f.write("low_score:%s" % str(int(self.vmw.low_score))) + f.write("low_score_beginner:%s" % str(int(self.vmw.low_score[0]))) + f.write("low_score_expert:%s" % str(int(self.vmw.low_score[1]))) f.close def set_title(self, title): |