-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ally move filter #100
Ally move filter #100
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -287,6 +290,102 @@ def generate_support_proposals(self, comms_obj: MessagesData) -> Dict[str, str]: | |||
final_messages[recipient] = str(suggested_proposals) | |||
comms_obj.add_message(recipient, str(suggested_proposals)) | |||
return final_messages | |||
|
|||
def is_order_aggressive_to_powers(self, order: str, powers: List[str]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to see a test for this function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a test for the whole process. Will later add the test case!
return False | ||
|
||
@gen.coroutine | ||
def get_non_aggressive_order(self, order: str, powers: List[str]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would also like to see a test for this function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that can be added too.
if not len(ally): | ||
return | ||
final_orders = [] | ||
for order in self.orders.get_list_of_orders(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments needed
self.orders = orders_data | ||
|
||
# filter out aggressive orders to allies | ||
yield self.replace_aggressive_order_to_allies() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would highly prefer a pattern in which orders are passed into and out of this function, e.g.
orders = yield self.replace_aggressive_order_to_allies(best_orders)
Resolves #91 |
related to #92 but still have to add enemy move filter. I want to pull the ally move filter first