NPC AI Npc Ai is coded in python in a read-only fashoin. The following algorithm should replace the stack do_cmd method. order = None try: order = self.next_order() # next_order promises not to modify anything except *: # should assume the worst and do some cleanup here and report error pass if order: order_list = utils.parse(order) self.do_order(order_list) python -> alang -> python #the intermediate step isolates errors and #requires npcs to be restricted to the same #command set as players