-
Notifications
You must be signed in to change notification settings - Fork 0
/
cubeconstants.py
75 lines (60 loc) · 1.13 KB
/
cubeconstants.py
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import pygame, random
MOVECOUNT=0
W=(255,255,255)
B=(0,0,255)
E=(255,128,0)
G=(0,200,0)
R=(255,0,0)
Y=(255,255,0)
BACKCOLOR=(0,0,0)
WINDOWWIDTH=1200
WINDOWHEIGHT=1000
CUBEWIDTH=290
CUBEHEIGHT=290
SFRONT=0
STOP=1
SRIGHT=2
SUNDER=3
SLEFT=4
SBACK=5
RTOP=0
RMID=1
RBOT=2
CLEFT=0
CMID=1
CRIGHT=2
XOFFSET=(WINDOWWIDTH-CUBEWIDTH)/2+CUBEWIDTH
YOFFSET=(WINDOWHEIGHT-CUBEHEIGHT)/2
DISPLAYSURF=pygame.display.set_mode((WINDOWWIDTH,WINDOWHEIGHT))
# F
CUBE=[[[B,B,B],
[B,B,B],
[B,B,B]],
# T
[[W,W,W],
[W,W,W],
[W,W,W]],
# R
[[E,E,E],
[E,E,E],
[E,E,E]],
# U
[[Y,Y,Y],
[Y,Y,Y],
[Y,Y,Y]],
# L
[[R,R,R],
[R,R,R],
[R,R,R]],
# B
[[G,G,G],
[G,G,G],
[G,G,G]]]
def WIN():
myfont = pygame.font.SysFont("monospace", 100)
label = myfont.render("You Win!!!", 1, (255,255,255))
DISPLAYSURF.blit(label, (100, 100))
def DISPLAYTEXT(MESSAGE,X,Y,COLOR):
fontobject=pygame.font.SysFont('monospace', 75)
if len(MESSAGE) != 0:
DISPLAYSURF.blit(fontobject.render(MESSAGE, 0, COLOR),(X,Y))