diff options
Diffstat (limited to 'Maze.activity/game.py')
-rw-r--r-- | Maze.activity/game.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Maze.activity/game.py b/Maze.activity/game.py index ab38a35..2ce497c 100644 --- a/Maze.activity/game.py +++ b/Maze.activity/game.py @@ -1,5 +1,6 @@ # Maze.activity # A simple multi-player maze game for the XO laptop. +# http://wiki.laptop.org/go/Maze # # Special thanks to Brendan Donohoe for the icon. # @@ -11,13 +12,13 @@ # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# Foobar is distributed in the hope that it will be useful, +# Maze.activity is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Foobar. If not, see <http://www.gnu.org/licenses/>. +# along with Maze.activity. If not, see <http://www.gnu.org/licenses/>. import sys @@ -225,6 +226,13 @@ class MazeGame: print "Error handling message: %s\n%s" % (event, sys.exc_info()) else: print "Message from unknown buddy?" + elif event.type == pygame.USEREVENT: + if event.action == 'harder': + self.harder() + elif event.action == 'easier': + self.easier() + else: + print "Unknown user event action:", event.action else: print "Unknown event:", event |