Skip to content

Commit

Permalink
Minor fixes and improvements in light of Andrew's feedback. I think w…
Browse files Browse the repository at this point in the history
…e have an entry now!
  • Loading branch information
ntoll committed Oct 27, 2018
1 parent 12b6f92 commit a702a58
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
'speed': 6,
'vehicles': ['bike', ],
'max_zombies': 1,
'swerve': 0,
'swerve': 1,
},
{
'speed': 7,
Expand All @@ -46,13 +46,13 @@
{
'speed': 9,
'vehicles': ['bike', 'car', 'motorbike', 'taxi', 'bus', 'lorry', ],
'max_zombies': 4,
'max_zombies': 5,
'swerve': 0,
},
{
'speed': 10,
'vehicles': ['bike', 'car', 'motorbike', 'taxi', 'bus', 'lorry', ],
'max_zombies': 6,
'max_zombies': 8,
'swerve': 1,
},
]
Expand Down Expand Up @@ -86,8 +86,7 @@
'sound': [sounds.taxi_driver1, sounds.taxi_driver2,
sounds.taxi_driver3, sounds.taxi_driver4,
sounds.taxi_driver5, sounds.taxi_driver6,
sounds.taxi_driver7, sounds.taxi_driver8,
sounds.taxi_driver9]
sounds.taxi_driver7]
},
'bus': {
'image': 'bus',
Expand Down Expand Up @@ -244,7 +243,6 @@ def update():
player.image = 'hero1'
player.lives -= 1 # deduct a life.
zombies = []
traffic = []
player.pos = (368, rows[player.row])
else:
# Update the level.
Expand Down Expand Up @@ -387,7 +385,7 @@ def update_level():
play_sound(random.choice(vehicle.sfx))
if player.colliderect(vehicle):
# Hit by traffic!
if state != 'failed' and state != 'dead':
if state != 'failed' and (state != 'dead' and state != 'next'):
state = 'dead'
sounds.splat2.play()
# Remove all the traffic that is now off the screen.
Expand Down

0 comments on commit a702a58

Please sign in to comment.