commit
This commit is contained in:
parent
4416ece0a9
commit
1a3dc6f4e2
17
otime.py
17
otime.py
@ -148,7 +148,11 @@ class runner:
|
|||||||
# Returns False if not ok and touple if ok
|
# Returns False if not ok and touple if ok
|
||||||
return contains(self.o_class.course.codes, self.controls)
|
return contains(self.o_class.course.codes, self.controls)
|
||||||
def totaltime(self):
|
def totaltime(self):
|
||||||
return self.splits[-2]
|
f_control = self.o_class.course.codes[-1]
|
||||||
|
try:
|
||||||
|
return self.card_r.punches[f_control]
|
||||||
|
except:
|
||||||
|
return list(self.card_r.punches.values())[-1]
|
||||||
|
|
||||||
def status(self):
|
def status(self):
|
||||||
if self.controls == []:
|
if self.controls == []:
|
||||||
@ -161,11 +165,12 @@ class runner:
|
|||||||
c_ranked = rank_runners(allrunners, self.o_class)
|
c_ranked = rank_runners(allrunners, self.o_class)
|
||||||
return c_ranked.index(self) + 1
|
return c_ranked.index(self) + 1
|
||||||
def res_splits(self):
|
def res_splits(self):
|
||||||
control_map = self.check_codes()
|
res_p = self.card_r.punches.copy()
|
||||||
splits = []
|
for key in res_p.keys:
|
||||||
for n in control_map:
|
if key not in self.o_class.course.codes
|
||||||
splits.append(self.splits[n])
|
res_p.pop(key)
|
||||||
return splits
|
return res_p
|
||||||
|
|
||||||
class card_punch:
|
class card_punch:
|
||||||
def __init__(self, card, punches, s_time, f_time):
|
def __init__(self, card, punches, s_time, f_time):
|
||||||
self.card = card
|
self.card = card
|
||||||
|
Loading…
Reference in New Issue
Block a user