def command_connection_ok(self, from_state, to_state, spawn_pos): """Executes the INIT command from the Server. Returns True if the state transition is successful.""" logging.debug( f"command_connection_ok(): {from_state} -> {to_state} spawn_pos = {spawn_pos}" ) self.__proto_message = ProtoMessage.ready_message({ "game_type": "/Ship", "pos": spawn_pos, "heading": 0, "health": 58 }) return True
def command_init(self, from_state, to_state): """Executes the INIT command from the Server. Returns True if the state transition is successful.""" logging.debug(f"command_init(): {from_state} -> {to_state}") self.__proto_message = ProtoMessage.ready_message() return True