Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bskinny129 committed Dec 16, 2015
1 parent 12ec571 commit e95194d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Day-4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ We can use Pygame to draw lines, rectangles, and circles on the screen.
Start with this code:

```python
#setup
import pygame
pygame.init()
screen = pygame.display.set_mode((640,480))


screen.fill(pygame.color.THECOLORS['black'])

pygame.draw.line(screen,pygame.color.THECOLORS['white'],(500,450),(400,300))
Expand All @@ -56,6 +58,8 @@ pygame.draw.rect(screen,pygame.color.THECOLORS['white'],(200,100,50,100))

pygame.display.flip()


#closing the window
running = True
while running:
for event in pygame.event.get():
Expand Down Expand Up @@ -83,10 +87,12 @@ Can you make the line be on top of the other shapes?
We can also have shapes that aren't filled in:

```python
#setup
import pygame
pygame.init()
screen = pygame.display.set_mode((640,480))


screen.fill(pygame.color.THECOLORS['black'])

pygame.draw.line(screen,pygame.color.THECOLORS['red'],(500,450),(400,300),6)
Expand All @@ -95,6 +101,8 @@ pygame.draw.rect(screen,pygame.color.THECOLORS['green'],(200,100,50,100),8)

pygame.display.flip()


#closing the window
running = True
while running:
for event in pygame.event.get():
Expand Down

0 comments on commit e95194d

Please sign in to comment.