-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRectangle.py
More file actions
41 lines (31 loc) · 825 Bytes
/
Rectangle.py
File metadata and controls
41 lines (31 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from Piece import Piece
from Piece_S import Piece_S
from Piece_L import Piece_L
from Piece_O import Piece_O
from Piece_H import Piece_H
from Piece_I import Piece_I
from random import randrange
class Rectangle():
def __init__(self,width,height):
self.width = width
self.height = height
def rand(self,choix):
if choix == 1:
return Piece_L()
elif choix == 2 :
return Piece_S()
elif choix == 3 :
return Piece_H()
elif choix == 4 :
return Piece_O()
elif choix == 5 :
return Piece_I()
gameover = False
while gameover == False:
rec = Rectangle(20,29)
aleatoire = randrange(1,5)
print (aleatoire)
block = rec.rand(aleatoire)
"""affichage"""
gameover = True
break