MultiServer: make !hint prefer non-local

This commit is contained in:
Fabian Dill 2022-07-16 11:44:56 +02:00 committed by Fabian Dill
parent a42f7f99fe
commit 622af17705
1 changed files with 2 additions and 0 deletions

View File

@ -1308,6 +1308,8 @@ class ClientMessageProcessor(CommonCommandProcessor):
can_pay = 1000
self.ctx.random.shuffle(not_found_hints)
# By popular vote, make hints prefer non-local placements
not_found_hints.sort(key=lambda hint: int(hint.receiving_player != hint.finding_player))
hints = found_hints
while can_pay > 0: