Skip to content

Commit 30f3892

Browse files
authored
Merge pull request #6 from stfc/pygame2-comment-indent
Correct indentation of comments
2 parents d9a505a + d084907 commit 30f3892

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

PythonLessons/PyGame/pygame-lesson2.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,35 +58,35 @@
5858
pygame.quit()
5959
sys.exit()
6060

61-
# clear the surface by filling with black
61+
# clear the surface by filling with black
6262
windowSurface.fill(BLACK)
6363

64-
# check if the first rectangle is off screen? If it is,
65-
# change the direction it moves in
64+
# check if the first rectangle is off screen? If it is,
65+
# change the direction it moves in
6666
if (rectangle.right > WINDOWWIDTH):
6767
move = - move
6868
elif (rectangle.left <= 0):
6969
move = -move
7070

71-
# check if rectangle2 is off screen? If it is, change the direction it
72-
# moves in
71+
# check if rectangle2 is off screen? If it is, change the direction it
72+
# moves in
7373

7474
if (rectangle2.right > WINDOWWIDTH):
7575
move2 = - move2
7676
elif (rectangle2.left <= 0):
7777
move2 = -move2
7878

79-
# do rectangle and rectangle2 overlap? If they do, change the direction they
80-
# move in
79+
# do rectangle and rectangle2 overlap? If they do, change the direction they
80+
# move in
8181
if ((rectangle2.left > rectangle.left) and (rectangle2.left < rectangle.right )) or ((rectangle2.right > rectangle.left) and (rectangle2.right < rectangle.right)):
8282
move = -move
8383
move2 = -move2
8484

85-
# alter position of the rectangles - i.e. make them move
85+
# alter position of the rectangles - i.e. make them move
8686
topx = rectangle.left + move
8787
topx2 = rectangle2.left + move2
8888

89-
# redraw rectangles
89+
# redraw rectangles
9090
rectangle = pygame.draw.rect(windowSurface, RED, (topx, 50, 100, 50))
9191
rectangle2 = pygame.draw.rect(windowSurface, GREEN, (topx2, 50, 50, 50))
9292

0 commit comments

Comments
 (0)