Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvandeneynde committed Jan 24, 2018
0 parents commit 6734ff6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Choose a branch to get one of the tutorials.
41 changes: 41 additions & 0 deletions pygame0_code_minimal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!coding: utf-8
from __future__ import print_function, division

import pygame
pygame.init()

taille = [700, 500]
ecran = pygame.display.set_mode(taille)

NOIR = [0, 0, 0]
BLANC = [255, 255, 255]
ROUGE = [255, 0, 0]
VERT = [0, 255, 0]
BLEU = [0, 0, 255]

# DÉBUT

clock = pygame.time.Clock()

fini = 0
while fini == 0:

for event in pygame.event.get():
if event.type == pygame.QUIT:
fini = 1

# TICK


# DESSIN
ecran.fill(BLANC)

pygame.draw.rect(ecran, ROUGE, [100,200, 20,40])
pygame.draw.circle(ecran, BLEU, [100,200], 20)
pygame.draw.circle(ecran, VERT, [150, 80], 10)

pygame.display.flip()

clock.tick(60)

pygame.quit()

0 comments on commit 6734ff6

Please sign in to comment.