def _btn_them_goal(self): msg = GameStateMsg() msg.play = self.game_state['play'] msg.two_v_two = self.game_state['two_v_two'] msg.usgoal = False msg.themgoal = True self.pub_game_state.publish(msg)
def _btn_toggle_spacebar(self): # Toggle play self.game_state['play'] = not self.game_state['play'] self.ui.change_toggle_text() msg = GameStateMsg() msg.play = self.game_state['play'] msg.two_v_two = self.game_state['two_v_two'] msg.usgoal = False msg.themgoal = False self.pub_game_state.publish(msg)