specify sorting key for sorting nested lists in elimination game

This commit is contained in:
Roman Trapeznikov 2020-04-10 12:48:21 +03:00
parent b13df59274
commit 93c407cccc

View File

@ -400,7 +400,8 @@ class EliminationGame(ba.TeamGameActivity):
self.map.get_start_position(team.get_id()))
points.append(
((start_pos - player_pos).length(), start_pos))
points.sort()
# Hmm.. we need to sorting vectors too?
points.sort(key=lambda x: x[0])
return points[-1][1]
return None