Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2012-04-20 15:00:15 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-04-20 15:00:15 (GMT)
commit880622e706520a7dbf20e36f695d290a2eed34e2 (patch)
tree361e7b93eb385ded45fb5fc82763c0ea9d3f8a4f
parentece22f362b07c5e4c83d837ad67f5f865e311fad (diff)
more tweaks to scoring
-rw-r--r--VisualMatchActivity.py12
-rw-r--r--game.py3
2 files changed, 3 insertions, 12 deletions
diff --git a/VisualMatchActivity.py b/VisualMatchActivity.py
index 59653ee..1ceba76 100644
--- a/VisualMatchActivity.py
+++ b/VisualMatchActivity.py
@@ -245,17 +245,7 @@ class VisualMatchActivity(activity.Activity):
'custom_' + str(i), None))
def _write_scores_to_clipboard(self, button=None):
- '''
- before = '{"chart_line_color": "#00588C", "title": \
-"%s", "x_label": "", "y_label": "", "chart_data": ' % (self.metadata['title'])
- scores = []
- for i, s in enumerate(self.vmw.all_scores):
- scores.append(['%s' % str(i + 1), s])
- jscores = self._data_dumper(scores)
- after = ', "chart_color": "#00A0FF", "current_chart.type": "line"}'
- _logger.debug(before + jscores + after)
- gtk.Clipboard().set_text(before + jscores + after)
- '''
+ ''' SimpleGraph will plot the cululative results '''
jscores = ''
for i, s in enumerate(self.vmw.all_scores):
jscores += '%s: %s\n' % (str(i + 1), s)
diff --git a/game.py b/game.py
index 4e28ff0..6a8ad8e 100644
--- a/game.py
+++ b/game.py
@@ -725,7 +725,8 @@ class Game():
self.set_label('status', '%s (%d:%02d)' %
(_('New record'), int(self.total_time / 60),
int(self.total_time % 60)))
- self.all_scores.append(self.total_time)
+ # Round to nearest second
+ self.all_scores.append(int(self.total_time + 0.5))
if not self._sugar:
self.activity.save_score()
return True