Skip to content

Commit

Permalink
feat(single-mode): adjust training partner score
Browse files Browse the repository at this point in the history
  • Loading branch information
NateScarlet committed Aug 30, 2021
1 parent 6ff8b81 commit 0a80b7f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions auto_derby/single_mode/training/partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,17 @@ def __str__(self):
def score(self, ctx: Context) -> float:
if self.type == self.TYPE_OTHER:
return 2 + self.level
ret = mathtools.interpolate(
ctx.turn_count(),
(
(0, 5),
(24, 3),
(48, 2),
(72, 0),
),
)
ret = 0
if 0 <= self.level < 4:
ret = mathtools.interpolate(
ctx.turn_count(),
(
(0, 5),
(24, 3),
(48, 2),
(72, 0),
),
)
if self.has_training:
ret += 7
return ret
Expand Down

0 comments on commit 0a80b7f

Please sign in to comment.