更改了obea的sequence

This commit is contained in:
Caiyishuai 2023-11-13 14:48:58 +08:00
parent ed5b99e69b
commit a7007aeea7
2 changed files with 3 additions and 3 deletions

View File

@ -185,10 +185,10 @@ class OptBTExpAlgorithm:
elif child.type == 'act': elif child.type == 'act':
self.ptml_string += 'act '+child.content.name+"\n" self.ptml_string += 'act '+child.content.name+"\n"
elif isinstance(child, ControlBT): elif isinstance(child, ControlBT):
if parnode.type == '?': if child.type == '?':
self.ptml_string += "selector{\n" self.ptml_string += "selector{\n"
self.dfs_ptml(parnode=child) self.dfs_ptml(parnode=child)
elif parnode.type == '>': elif child.type == '>':
self.ptml_string += "sequence{\n" self.ptml_string += "sequence{\n"
self.dfs_ptml( parnode=child) self.dfs_ptml( parnode=child)
self.ptml_string += '}\n' self.ptml_string += '}\n'

View File

@ -1,6 +1,6 @@
selector{ selector{
cond At(Coffee,Bar) cond At(Coffee,Bar)
selector{ sequence{
cond At(Robot,CoffeeMachine) cond At(Robot,CoffeeMachine)
act MakeCoffee() act MakeCoffee()
} }