Add get_mains() method
Returns the list of chars used ordered by the number of time they were used.master
parent
f5350d506f
commit
290445a26d
|
@ -119,6 +119,14 @@ class Player():
|
|||
except KeyError:
|
||||
self.chars[character] = ( 1.01 if win else 1.00 )
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
def get_mains(self):
|
||||
return [ cv[0] for cv in sorted(
|
||||
self.chars.items(),
|
||||
key = lambda cv: cv[1],
|
||||
reverse = True,
|
||||
) ]
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
def conf(self):
|
||||
|
||||
|
|
Loading…
Reference in New Issue