diff options
author | Walter Bender <walter@walter-laptop.(none)> | 2009-11-27 22:25:45 (GMT) |
---|---|---|
committer | Walter Bender <walter@walter-laptop.(none)> | 2009-11-27 22:25:45 (GMT) |
commit | 7ecbf2e8aa2df23dfe154f5f729c1cb38697b8cc (patch) | |
tree | 2b07033791a0a3d41f2e14358303921a2b62e3cf | |
parent | 2e301c1be98cc999e23f7a3b08ab9061f3de1533 (diff) |
v3
-rw-r--r-- | NEWS | 18 | ||||
-rw-r--r-- | VisualMatchActivity.py | 23 | ||||
-rw-r--r-- | activity/activity.info | 2 | ||||
-rw-r--r-- | window.py | 32 |
4 files changed, 22 insertions, 53 deletions
@@ -0,0 +1,18 @@ +3 + +* Eliminate naming alert from pre-0.86 toolbar +* New pot file + +2 + +* New icon +* Fixed problem with the New Game button + +1 + +* Version 1 of a visual matching game. The object is to find sets of + three cards where each attribute—color, shape, number of elements, + and shading—either match on all three cards or are different on all + three cards. Version 1 doesn't yet support sharing with multiple + players or saving to the Journal, but it can be played by a single + player. diff --git a/VisualMatchActivity.py b/VisualMatchActivity.py index 1d9b30a..28ab914 100644 --- a/VisualMatchActivity.py +++ b/VisualMatchActivity.py @@ -31,6 +31,7 @@ try: # 0.86+ toolbar widgets from sugar.activity.widgets import StopButton from sugar.graphics.toolbarbox import ToolbarBox from sugar.graphics.toolbarbox import ToolbarButton + from namingalert import NamingAlert except ImportError: pass from sugar.graphics.toolbutton import ToolButton @@ -43,7 +44,6 @@ import locale import os.path from sprites import * -from namingalert import NamingAlert import window SERVICE = 'org.sugarlabs.VisualMatchActivity' @@ -80,7 +80,7 @@ class VisualMatchActivity(activity.Activity): toolbar_box.toolbar.insert(separator, -1) # Label for showing status - self.results_label = gtk.Label(_("look for a set")) + self.results_label = gtk.Label(_("Look for a set")) self.results_label.show() results_toolitem = gtk.ToolItem() results_toolitem.add(self.results_label) @@ -120,16 +120,6 @@ class VisualMatchActivity(activity.Activity): self.toolbox.show() - # Read the mode from the Journal - try: - if self.metadata['status'] == 'one': - self.show_button1() - elif self.metadata['status'] == 'two': - self.show_button2() - except: - self.metadata['status'] = "two" - - # Create a canvas canvas = gtk.DrawingArea() canvas.set_size_request(gtk.gdk.screen_width(), \ @@ -153,7 +143,6 @@ class VisualMatchActivity(activity.Activity): def show_button1(self, tw): self.button1.set_icon("button1on") - self.button2.set_icon("button2off") self.metadata['status'] = "one" tw.deck.shuffle() tw.deck.deal(tw) @@ -166,12 +155,6 @@ class VisualMatchActivity(activity.Activity): self.reveal() return True - """ - Write the additional status to the Journal - """ - def write_file(self, file_path): - pass - # # Project toolbar for pre-0.86 toolbars # @@ -183,7 +166,7 @@ class ProjectToolbar(gtk.Toolbar): # Button 1 self.activity.button1 = ToolButton( "button1off" ) - self.activity.button1.set_tooltip(_('Button 1')) + self.activity.button1.set_tooltip(_('New game')) self.activity.button1.props.sensitive = True self.activity.button1.connect('clicked', self.activity._button1_cb, self.activity) diff --git a/activity/activity.info b/activity/activity.info index 7298b29..6c82646 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -1,6 +1,6 @@ [Activity] name = Visual Match -activity_version = 4 +activity_version = 3 license = GPLv3 bundle_id = org.sugarlabs.VisualMatchActivity exec = sugar-activity VisualMatchActivity.VisualMatchActivity @@ -201,8 +201,6 @@ def set_check(cardarray): for a in cardarray: if a is None: return False - # else: - # break if (cardarray[0].num + cardarray[1].num + cardarray[2].num)%3 != 0: return False @@ -226,33 +224,3 @@ def set_check(cardarray): cardarray[0].color != cardarray[2].color: return False return True - """ - if (cardarray[0].num == cardarray[1].num): - if (cardarray[1].num != cardarray[2].num): - return False - else: - if (cardarray[1].num == cardarray[2].num): - return False - - if (cardarray[0].color == cardarray[1].color): - if (cardarray[1].color != cardarray[2].color): - return False - else: - if (cardarray[1].color == cardarray[2].color): - return False - - if (cardarray[0].fill == cardarray[1].fill): - if (cardarray[1].fill != cardarray[2].fill): - return False - else: - if (cardarray[1].fill == cardarray[2].fill): - return False - - if (cardarray[0].shape == cardarray[1].shape): - if (cardarray[1].shape != cardarray[2].shape): - return False - else: - if (cardarray[1].shape == cardarray[2].shape): - return False - return True - """ |