Skip to content

Commit

Permalink
Update for 2019
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmtracey committed May 6, 2019
1 parent d64b65f commit ef25c63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Part 4/Code/drop.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ def movePlayer():
leftOfPlayerOnPlatform = True
rightOfPlayerOnPlatform = True

if surface.get_at((player["x"], player["y"] + player["height"])) == (0,0,0,255):
if surface.get_at(( int(player["x"]), int(player["y"]) + player["height"])) == (0,0,0,255):
leftOfPlayerOnPlatform = False

if surface.get_at((player["x"] + player["width"], player["y"] + player["height"])) == (0,0,0,255):
if surface.get_at(( int(player["x"]) + player["width"], int(player["y"]) + player["height"])) == (0,0,0,255):
rightOfPlayerOnPlatform = False

if leftOfPlayerOnPlatform is False and rightOfPlayerOnPlatform is False and (player["y"] + player["height"]) + player["vy"] < windowHeight:
Expand All @@ -70,7 +70,7 @@ def movePlayer():

while foundPlatformTop is False:

if surface.get_at((player["x"], (player["y"] + player["height"]) - yOffset )) == (0,0,0,255):
if surface.get_at(( int(player["x"]), ( int(player["y"]) + player["height"]) - yOffset )) == (0,0,0,255):
player["y"] -= yOffset
foundPlatformTop = True
elif (player["y"] + player["height"]) - yOffset > 0:
Expand Down
1 change: 0 additions & 1 deletion Part 9/aliens.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def updateGame():

if shipIsDestroyed is True:
gameOver = True
print "\n\n\nYou Died\n\n\n"
quitGame()

else:
Expand Down

0 comments on commit ef25c63

Please sign in to comment.