Skip to content

Commit

Permalink
Clarifying for myself
Browse files Browse the repository at this point in the history
  • Loading branch information
buntine committed Feb 14, 2016
1 parent d2cdea3 commit d2a6641
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions swervin_mervin/player.py
Expand Up @@ -57,6 +57,7 @@ def steer(self, segment):

# Apply centrifugal force if we are going around a corner.
if segment.curve != 0 and self.status == self.ALIVE:
# Congratulate player if they've broken personal record.
self.x -= (self.direction_speed() * self.speed_percent() * segment.curve * self.settings["centrifugal_force"])

def climb(self, segment):
Expand Down Expand Up @@ -154,6 +155,7 @@ def render_hud(self, window):
st = self.special_text
time_colour = s.COLOURS["text"] if self.time_left > 5 else s.COLOURS["red"]

# Speedometer.
pygame.draw.circle(window, s.COLOURS["black"], center, 50, 2)
pygame.draw.circle(window, s.COLOURS["black"], center, 4)
pygame.draw.line(window, s.COLOURS["black"], start, finish, 3)
Expand Down Expand Up @@ -289,6 +291,7 @@ def travel(self, track_length, window):
self.points += bonus_points

if self.__fastest_lap():
# Congratulate player if they've broken personal record.
if self.lap > 2:
self.points += self.lap_margin * s.POINTS * self.lap
fast_lap_sfx = pygame.mixer.Sound(os.path.join("lib", "jim.ogg"))
Expand Down

0 comments on commit d2a6641

Please sign in to comment.