From 54817de70cd9adfd8c8828364fafb91c8bb4344c Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Wed, 07 Dec 2011 19:44:27 +0000 Subject: less ambiguous method names for sharing --- diff --git a/ReflectionActivity.py b/ReflectionActivity.py index 4ee68f3..a49f4ad 100644 --- a/ReflectionActivity.py +++ b/ReflectionActivity.py @@ -248,7 +248,7 @@ state=%d' % (id, initiator, type, service, params, state)) return self._processing_methods[command][0](payload) - def start_new_game(self): + def send_new_game(self): ''' Send a new orientation, grid to all players ''' self.send_event('n|%s' % (json_dump(self._game.save_game()))) @@ -257,7 +257,7 @@ state=%d' % (id, initiator, type, service, params, state)) (dot_list, orientation) = json_load(payload) self._game.restore_game(dot_list, orientation) - def send_button_press(self, dot, color): + def send_dot_click(self, dot, color): ''' Send a dot click to all the players ''' self.send_event('p|%s' % (json_dump([dot, color]))) diff --git a/game.py b/game.py index 7018151..aba2083 100644 --- a/game.py +++ b/game.py @@ -141,7 +141,7 @@ class Game(): self._colors[self._dots[n].type])) if self.we_are_sharing: - self._parent.start_new_game() + self._parent.send_new_game() def restore_game(self, dot_list, orientation): ''' Restore a game from the Journal or share ''' @@ -178,8 +178,8 @@ class Game(): self._test_game_over() if self.we_are_sharing: - self._parent.send_button_press(self._dots.index(spr), - spr.type) + self._parent.send_dot_click(self._dots.index(spr), + spr.type) return True def remote_button_press(self, dot, color): -- cgit v0.9.1