コード例 #1
0
ファイル: manual_control.py プロジェクト: Sakartu/LoBotomy
	def parse_command(self, command):
		try:
			cmd = protocol.parse_msg(command)
			signal_function = getattr(self.player, 'signal_' + cmd['command'])
			self.commands.append((signal_function,) + tuple(cmd.values())[1:])
			print('Will send command ' + str(list(str(k) + ' : ' + str(v) for (k,v) in cmd.items())))
		except ValueError as e:
			print('Error while parsing command:')
			print(e)
コード例 #2
0
 def parse_command(self, command):
     try:
         cmd = protocol.parse_msg(command)
         signal_function = getattr(self.player, 'signal_' + cmd['command'])
         self.commands.append((signal_function, ) + tuple(cmd.values())[1:])
         print('Will send command ' +
               str(list(str(k) + ' : ' + str(v) for (k, v) in cmd.items())))
     except ValueError as e:
         print('Error while parsing command:')
         print(e)
コード例 #3
0
ファイル: manual_control.py プロジェクト: Remboooo/LoBotomy
 def parse_command(self, command):
     try:
         cmd = protocol.parse_msg(command)
         self.commands.append(cmd)
         print("Will send command " + str(list(str(k) + " : " + str(v) for (k, v) in cmd.items())))
     except ValueError as e:
         print("Error while parsing command:")
         print(e)