-
Notifications
You must be signed in to change notification settings - Fork 0
/
positions.py
167 lines (143 loc) · 17 KB
/
positions.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
from cubeconstants import*
import math, pygame
RSIDEWIDTH=75
RSIDERISE=75
RGAP=10
TSIDERISE =RSIDERISE
TSIDEWIDTH=RSIDEWIDTH
TGAP=RGAP
SQUARESLOPE=math.sqrt((RSIDEWIDTH**2+RSIDERISE**2)-(2*RGAP))/3
SQUARERUN=(SQUARESLOPE*RSIDEWIDTH)/math.sqrt(RSIDEWIDTH**2+RSIDERISE**2)
SQUARERISE=(RSIDERISE*SQUARERUN)/RSIDEWIDTH
GAPRUN=(RGAP*RSIDEWIDTH)/math.sqrt(RSIDEWIDTH**2+RSIDERISE**2)
GAPRISE=(GAPRUN*RSIDERISE)/RSIDEWIDTH
TSQUARESLOPE=math.sqrt((TSIDEWIDTH**2+TSIDERISE**2)-(2*TGAP))/3
TSQUARERISE=(TSQUARESLOPE*TSIDERISE)/math.sqrt(TSIDEWIDTH**2+TSIDERISE**2)
TSQUARERUN=(TSIDEWIDTH*TSQUARERISE)/TSIDERISE
TGAPRISE=(TGAP*TSIDERISE)/math.sqrt(TSIDEWIDTH**2+TSIDERISE**2)
TGAPRUN=(TGAPRISE*TSIDEWIDTH)/TSIDERISE
BOXWIDTH=90
BOXHEIGHT=90
ORIGINX=XOFFSET+GAPRUN
ORIGINY=YOFFSET+BOXHEIGHT-GAPRISE
LORIGINX=XOFFSET-CUBEWIDTH-GAPRUN*3-SQUARERUN*3
LORIGINY=YOFFSET+GAPRISE*3+SQUARERISE*3+BOXHEIGHT
UORIGINX1=LORIGINX+GAPRUN
UORIGINX2=LORIGINX+TGAPRUN*2+BOXWIDTH
UORIGINX3=LORIGINX+TGAPRUN*3+BOXWIDTH*2
UORIGINY=LORIGINY+BOXHEIGHT*2+GAPRISE*3
TORIGINX1=(WINDOWWIDTH-CUBEWIDTH)/2+TGAPRUN
TORIGINY=YOFFSET-TGAPRISE
TORIGINX2=(WINDOWWIDTH-CUBEWIDTH)/2+TGAPRUN*2+BOXWIDTH
TORIGINX3=(WINDOWWIDTH-CUBEWIDTH)/2+TGAPRUN*3+BOXWIDTH*2
BBOXWIDTH=80
BBOXHEIGHT=80
FUPPERLEFT=((WINDOWWIDTH-CUBEWIDTH)/2+0,(WINDOWHEIGHT-CUBEHEIGHT)/2+0,BOXWIDTH,BOXHEIGHT)
FUPPERMID=((WINDOWWIDTH-CUBEWIDTH)/2+100,(WINDOWHEIGHT-CUBEHEIGHT)/2+0,BOXWIDTH,BOXHEIGHT)
FUPPERRIGHT=((WINDOWWIDTH-CUBEWIDTH)/2+200,(WINDOWHEIGHT-CUBEHEIGHT)/2+0,BOXWIDTH,BOXHEIGHT)
FMIDLEFT=((WINDOWWIDTH-CUBEWIDTH)/2+0,(WINDOWHEIGHT-CUBEHEIGHT)/2+100,BOXWIDTH,BOXHEIGHT)
FMIDMID=((WINDOWWIDTH-CUBEWIDTH)/2+100,(WINDOWHEIGHT-CUBEHEIGHT)/2+100,BOXWIDTH,BOXHEIGHT)
FMIDRIGHT=((WINDOWWIDTH-CUBEWIDTH)/2+200,(WINDOWHEIGHT-CUBEHEIGHT)/2+100,BOXWIDTH,BOXHEIGHT)
FBOTLEFT=((WINDOWWIDTH-CUBEWIDTH)/2+0,(WINDOWHEIGHT-CUBEHEIGHT)/2+200,BOXWIDTH,BOXHEIGHT)
FBOTMID=((WINDOWWIDTH-CUBEWIDTH)/2+100,(WINDOWHEIGHT-CUBEHEIGHT)/2+200,BOXWIDTH,BOXHEIGHT)
FBOTRIGHT=((WINDOWWIDTH-CUBEWIDTH)/2+200,(WINDOWHEIGHT-CUBEHEIGHT)/2+200,BOXWIDTH,BOXHEIGHT)
RUPPERLEFT=((ORIGINX,ORIGINY),(ORIGINX+SQUARERUN,ORIGINY-SQUARERISE),(ORIGINX+SQUARERUN,ORIGINY-SQUARERISE-BOXHEIGHT),(ORIGINX,ORIGINY-BOXHEIGHT))
RUPPERMID=((ORIGINX+SQUARERUN+GAPRUN,ORIGINY-SQUARERISE-GAPRISE),(ORIGINX+SQUARERUN+GAPRUN+SQUARERUN,ORIGINY-SQUARERISE-GAPRISE-SQUARERISE),(ORIGINX+SQUARERUN+GAPRUN+SQUARERUN,ORIGINY-SQUARERISE-GAPRISE-SQUARERISE-BOXHEIGHT),(ORIGINX+SQUARERUN+GAPRUN,ORIGINY-BOXHEIGHT-SQUARERISE-GAPRISE))
RUPPERRIGHT=((ORIGINX+SQUARERUN*2+GAPRUN*2,ORIGINY-SQUARERISE*2-GAPRISE*2),(ORIGINX+SQUARERUN*3+GAPRUN*2,ORIGINY-SQUARERISE*3-GAPRISE*2),(ORIGINX+SQUARERUN*3+GAPRUN*2,ORIGINY-SQUARERISE*3-GAPRISE*2-BOXHEIGHT),(ORIGINX+SQUARERUN*2+GAPRUN*2,ORIGINY-SQUARERISE*2-GAPRISE*2-BOXHEIGHT))
RMIDLEFT=((ORIGINX,ORIGINY+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN,ORIGINY-SQUARERISE+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN,ORIGINY-SQUARERISE-BOXHEIGHT+BOXHEIGHT+RGAP),(ORIGINX,ORIGINY-BOXHEIGHT+BOXHEIGHT+RGAP))
RMIDMID=((ORIGINX+SQUARERUN+GAPRUN,ORIGINY-SQUARERISE-GAPRISE+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN+GAPRUN+SQUARERUN,ORIGINY-SQUARERISE-GAPRISE-SQUARERISE+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN+GAPRUN+SQUARERUN,ORIGINY-SQUARERISE-GAPRISE-SQUARERISE-BOXHEIGHT+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN+GAPRUN,ORIGINY-BOXHEIGHT-SQUARERISE-GAPRISE+BOXHEIGHT+RGAP))
RMIDRIGHT=((ORIGINX+SQUARERUN*2+GAPRUN*2,ORIGINY-SQUARERISE*2-GAPRISE*2+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN*3+GAPRUN*2,ORIGINY-SQUARERISE*3-GAPRISE*2+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN*3+GAPRUN*2,ORIGINY-SQUARERISE*3-GAPRISE*2-BOXHEIGHT+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN*2+GAPRUN*2,ORIGINY-SQUARERISE*2-GAPRISE*2-BOXHEIGHT+BOXHEIGHT+RGAP))
RBOTLEFT=((ORIGINX,ORIGINY+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN,ORIGINY-SQUARERISE+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN,ORIGINY-SQUARERISE-BOXHEIGHT+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(ORIGINX,ORIGINY-BOXHEIGHT+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP))
RBOTMID=((ORIGINX+SQUARERUN+GAPRUN,ORIGINY-SQUARERISE-GAPRISE+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN+GAPRUN+SQUARERUN,ORIGINY-SQUARERISE-GAPRISE-SQUARERISE+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN+GAPRUN+SQUARERUN,ORIGINY-SQUARERISE-GAPRISE-SQUARERISE-BOXHEIGHT+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN+GAPRUN,ORIGINY-BOXHEIGHT-SQUARERISE-GAPRISE+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP))
RBOTRIGHT=((ORIGINX+SQUARERUN*2+GAPRUN*2,ORIGINY-SQUARERISE*2-GAPRISE*2+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN*3+GAPRUN*2,ORIGINY-SQUARERISE*3-GAPRISE*2+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN*3+GAPRUN*2,ORIGINY-SQUARERISE*3-GAPRISE*2-BOXHEIGHT+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(ORIGINX+SQUARERUN*2+GAPRUN*2,ORIGINY-SQUARERISE*2-GAPRISE*2-BOXHEIGHT+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP))
TBOTLEFT=((TORIGINX1,TORIGINY),(TORIGINX1+TSQUARERUN,TORIGINY-TSQUARERISE),(TORIGINX1+TSQUARERUN+BOXWIDTH,TORIGINY-TSQUARERISE),(TORIGINX1+BOXWIDTH,TORIGINY))
TMIDLEFT=((TORIGINX1+TSQUARERUN+TGAPRUN,TORIGINY-TSQUARERISE-TGAPRISE),(TORIGINX1+TSQUARERUN+TGAPRUN+TSQUARERUN,TORIGINY-TSQUARERISE-TGAPRISE-TSQUARERISE),(TORIGINX1+TSQUARERUN+TGAPRUN+TSQUARERUN+90,TORIGINY-TSQUARERISE-TGAPRISE-TSQUARERISE),(TORIGINX1+TSQUARERUN+TGAPRUN+BOXWIDTH,TORIGINY-TSQUARERISE-TGAPRISE))
TUPPERLEFT=((TORIGINX1+TSQUARERUN*2+TGAPRUN*2,TORIGINY-TSQUARERISE*2-TGAPRISE*2),(TORIGINX1+TSQUARERUN*3+TGAPRUN*2,TORIGINY-TSQUARERISE*3-TGAPRISE*2),(TORIGINX1+TSQUARERUN*3+TGAPRUN*2+BOXWIDTH,TORIGINY-TSQUARERISE*3-TGAPRISE*2),(TORIGINX1+TSQUARERUN*2+TGAPRUN*2+BOXWIDTH,TORIGINY-TSQUARERISE*2-TGAPRISE*2))
TBOTMID=((TORIGINX2,TORIGINY),(TORIGINX2+TSQUARERUN,TORIGINY-TSQUARERISE),(TORIGINX2+TSQUARERUN+BOXWIDTH,TORIGINY-TSQUARERISE),(TORIGINX2+BOXWIDTH,TORIGINY))
TMIDMID=((TORIGINX2+TSQUARERUN+TGAPRUN,TORIGINY-TSQUARERISE-TGAPRISE),(TORIGINX2+TSQUARERUN+TGAPRUN+TSQUARERUN,TORIGINY-TSQUARERISE-TGAPRISE-TSQUARERISE),(TORIGINX2+TSQUARERUN+TGAPRUN+TSQUARERUN+90,TORIGINY-TSQUARERISE-TGAPRISE-TSQUARERISE),(TORIGINX2+TSQUARERUN+TGAPRUN+BOXWIDTH,TORIGINY-TSQUARERISE-TGAPRISE))
TUPPERMID=((TORIGINX2+TSQUARERUN*2+TGAPRUN*2,TORIGINY-TSQUARERISE*2-TGAPRISE*2),(TORIGINX2+TSQUARERUN*3+TGAPRUN*2,TORIGINY-TSQUARERISE*3-TGAPRISE*2),(TORIGINX2+TSQUARERUN*3+TGAPRUN*2+BOXWIDTH,TORIGINY-TSQUARERISE*3-TGAPRISE*2),(TORIGINX2+TSQUARERUN*2+TGAPRUN*2+BOXWIDTH,TORIGINY-TSQUARERISE*2-TGAPRISE*2))
TBOTRIGHT=((TORIGINX3,TORIGINY),(TORIGINX3+TSQUARERUN,TORIGINY-TSQUARERISE),(TORIGINX3+TSQUARERUN+BOXWIDTH,TORIGINY-TSQUARERISE),(TORIGINX3+BOXWIDTH,TORIGINY))
TMIDRIGHT=((TORIGINX3+TSQUARERUN+TGAPRUN,TORIGINY-TSQUARERISE-TGAPRISE),(TORIGINX3+TSQUARERUN+TGAPRUN+TSQUARERUN,TORIGINY-TSQUARERISE-TGAPRISE-TSQUARERISE),(TORIGINX3+TSQUARERUN+TGAPRUN+TSQUARERUN+90,TORIGINY-TSQUARERISE-TGAPRISE-TSQUARERISE),(TORIGINX3+TSQUARERUN+TGAPRUN+BOXWIDTH,TORIGINY-TSQUARERISE-TGAPRISE))
TUPPERRIGHT=((TORIGINX3+TSQUARERUN*2+TGAPRUN*2,TORIGINY-TSQUARERISE*2-TGAPRISE*2),(TORIGINX3+TSQUARERUN*3+TGAPRUN*2,TORIGINY-TSQUARERISE*3-TGAPRISE*2),(TORIGINX3+TSQUARERUN*3+TGAPRUN*2+BOXWIDTH,TORIGINY-TSQUARERISE*3-TGAPRISE*2),(TORIGINX3+TSQUARERUN*2+TGAPRUN*2+BOXWIDTH,TORIGINY-TSQUARERISE*2-TGAPRISE*2))
LUPPERLEFT=((LORIGINX,LORIGINY),(LORIGINX+SQUARERUN,LORIGINY-SQUARERISE),(LORIGINX+SQUARERUN,LORIGINY-SQUARERISE-BOXHEIGHT),(LORIGINX,LORIGINY-BOXHEIGHT))
LUPPERMID=((LORIGINX+SQUARERUN+GAPRUN,LORIGINY-SQUARERISE-GAPRISE),(LORIGINX+SQUARERUN+GAPRUN+SQUARERUN,LORIGINY-SQUARERISE-GAPRISE-SQUARERISE),(LORIGINX+SQUARERUN+GAPRUN+SQUARERUN,LORIGINY-SQUARERISE-GAPRISE-SQUARERISE-BOXHEIGHT),(LORIGINX+SQUARERUN+GAPRUN,LORIGINY-BOXHEIGHT-SQUARERISE-GAPRISE))
LUPPERRIGHT=((LORIGINX+SQUARERUN*2+GAPRUN*2,LORIGINY-SQUARERISE*2-GAPRISE*2),(LORIGINX+SQUARERUN*3+GAPRUN*2,LORIGINY-SQUARERISE*3-GAPRISE*2),(LORIGINX+SQUARERUN*3+GAPRUN*2,LORIGINY-SQUARERISE*3-GAPRISE*2-BOXHEIGHT),(LORIGINX+SQUARERUN*2+GAPRUN*2,LORIGINY-SQUARERISE*2-GAPRISE*2-BOXHEIGHT))
LMIDLEFT=((LORIGINX,LORIGINY+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN,LORIGINY-SQUARERISE+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN,LORIGINY-SQUARERISE-BOXHEIGHT+BOXHEIGHT+RGAP),(LORIGINX,LORIGINY-BOXHEIGHT+BOXHEIGHT+RGAP))
LMIDMID=((LORIGINX+SQUARERUN+GAPRUN,LORIGINY-SQUARERISE-GAPRISE+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN+GAPRUN+SQUARERUN,LORIGINY-SQUARERISE-GAPRISE-SQUARERISE+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN+GAPRUN+SQUARERUN,LORIGINY-SQUARERISE-GAPRISE-SQUARERISE-BOXHEIGHT+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN+GAPRUN,LORIGINY-BOXHEIGHT-SQUARERISE-GAPRISE+BOXHEIGHT+RGAP))
LMIDRIGHT=((LORIGINX+SQUARERUN*2+GAPRUN*2,LORIGINY-SQUARERISE*2-GAPRISE*2+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN*3+GAPRUN*2,LORIGINY-SQUARERISE*3-GAPRISE*2+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN*3+GAPRUN*2,LORIGINY-SQUARERISE*3-GAPRISE*2-BOXHEIGHT+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN*2+GAPRUN*2,LORIGINY-SQUARERISE*2-GAPRISE*2-BOXHEIGHT+BOXHEIGHT+RGAP))
LBOTLEFT=((LORIGINX,LORIGINY+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN,LORIGINY-SQUARERISE+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN,LORIGINY-SQUARERISE-BOXHEIGHT+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(LORIGINX,LORIGINY-BOXHEIGHT+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP))
LBOTMID=((LORIGINX+SQUARERUN+GAPRUN,LORIGINY-SQUARERISE-GAPRISE+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN+GAPRUN+SQUARERUN,LORIGINY-SQUARERISE-GAPRISE-SQUARERISE+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN+GAPRUN+SQUARERUN,LORIGINY-SQUARERISE-GAPRISE-SQUARERISE-BOXHEIGHT+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN+GAPRUN,LORIGINY-BOXHEIGHT-SQUARERISE-GAPRISE+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP))
LBOTRIGHT=((LORIGINX+SQUARERUN*2+GAPRUN*2,LORIGINY-SQUARERISE*2-GAPRISE*2+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN*3+GAPRUN*2,LORIGINY-SQUARERISE*3-GAPRISE*2+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN*3+GAPRUN*2,LORIGINY-SQUARERISE*3-GAPRISE*2-BOXHEIGHT+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP),(LORIGINX+SQUARERUN*2+GAPRUN*2,LORIGINY-SQUARERISE*2-GAPRISE*2-BOXHEIGHT+BOXHEIGHT+RGAP+BOXHEIGHT+RGAP))
UBOTLEFT=((UORIGINX1,UORIGINY),(UORIGINX1+TSQUARERUN,UORIGINY-TSQUARERISE),(UORIGINX1+TSQUARERUN+BOXWIDTH,UORIGINY-TSQUARERISE),(UORIGINX1+BOXWIDTH,UORIGINY))
UMIDLEFT=((UORIGINX1+TSQUARERUN+TGAPRUN,UORIGINY-TSQUARERISE-TGAPRISE),(UORIGINX1+TSQUARERUN+TGAPRUN+TSQUARERUN,UORIGINY-TSQUARERISE-TGAPRISE-TSQUARERISE),(UORIGINX1+TSQUARERUN+TGAPRUN+TSQUARERUN+90,UORIGINY-TSQUARERISE-TGAPRISE-TSQUARERISE),(UORIGINX1+TSQUARERUN+TGAPRUN+BOXWIDTH,UORIGINY-TSQUARERISE-TGAPRISE))
UUPPERLEFT=((UORIGINX1+TSQUARERUN*2+TGAPRUN*2,UORIGINY-TSQUARERISE*2-TGAPRISE*2),(UORIGINX1+TSQUARERUN*3+TGAPRUN*2,UORIGINY-TSQUARERISE*3-TGAPRISE*2),(UORIGINX1+TSQUARERUN*3+TGAPRUN*2+BOXWIDTH,UORIGINY-TSQUARERISE*3-TGAPRISE*2),(UORIGINX1+TSQUARERUN*2+TGAPRUN*2+BOXWIDTH,UORIGINY-TSQUARERISE*2-TGAPRISE*2))
UBOTMID=((UORIGINX2,UORIGINY),(UORIGINX2+TSQUARERUN,UORIGINY-TSQUARERISE),(UORIGINX2+TSQUARERUN+BOXWIDTH,UORIGINY-TSQUARERISE),(UORIGINX2+BOXWIDTH,UORIGINY))
UMIDMID=((UORIGINX2+TSQUARERUN+TGAPRUN,UORIGINY-TSQUARERISE-TGAPRISE),(UORIGINX2+TSQUARERUN+TGAPRUN+TSQUARERUN,UORIGINY-TSQUARERISE-TGAPRISE-TSQUARERISE),(UORIGINX2+TSQUARERUN+TGAPRUN+TSQUARERUN+90,UORIGINY-TSQUARERISE-TGAPRISE-TSQUARERISE),(UORIGINX2+TSQUARERUN+TGAPRUN+BOXWIDTH,UORIGINY-TSQUARERISE-TGAPRISE))
UUPPERMID=((UORIGINX2+TSQUARERUN*2+TGAPRUN*2,UORIGINY-TSQUARERISE*2-TGAPRISE*2),(UORIGINX2+TSQUARERUN*3+TGAPRUN*2,UORIGINY-TSQUARERISE*3-TGAPRISE*2),(UORIGINX2+TSQUARERUN*3+TGAPRUN*2+BOXWIDTH,UORIGINY-TSQUARERISE*3-TGAPRISE*2),(UORIGINX2+TSQUARERUN*2+TGAPRUN*2+BOXWIDTH,UORIGINY-TSQUARERISE*2-TGAPRISE*2))
UBOTRIGHT=((UORIGINX3,UORIGINY),(UORIGINX3+TSQUARERUN,UORIGINY-TSQUARERISE),(UORIGINX3+TSQUARERUN+BOXWIDTH,UORIGINY-TSQUARERISE),(UORIGINX3+BOXWIDTH,UORIGINY))
UMIDRIGHT=((UORIGINX3+TSQUARERUN+TGAPRUN,UORIGINY-TSQUARERISE-TGAPRISE),(UORIGINX3+TSQUARERUN+TGAPRUN+TSQUARERUN,UORIGINY-TSQUARERISE-TGAPRISE-TSQUARERISE),(UORIGINX3+TSQUARERUN+TGAPRUN+TSQUARERUN+90,UORIGINY-TSQUARERISE-TGAPRISE-TSQUARERISE),(UORIGINX3+TSQUARERUN+TGAPRUN+BOXWIDTH,UORIGINY-TSQUARERISE-TGAPRISE))
UUPPERRIGHT=((UORIGINX3+TSQUARERUN*2+TGAPRUN*2,UORIGINY-TSQUARERISE*2-TGAPRISE*2),(UORIGINX3+TSQUARERUN*3+TGAPRUN*2,UORIGINY-TSQUARERISE*3-TGAPRISE*2),(UORIGINX3+TSQUARERUN*3+TGAPRUN*2+BOXWIDTH,UORIGINY-TSQUARERISE*3-TGAPRISE*2),(UORIGINX3+TSQUARERUN*2+TGAPRUN*2+BOXWIDTH,UORIGINY-TSQUARERISE*2-TGAPRISE*2))
BUPPERLEFT=((WINDOWWIDTH-CUBEWIDTH)/2+CUBEWIDTH*1.25,(WINDOWHEIGHT-CUBEHEIGHT)/2+CUBEHEIGHT*1.25,BBOXWIDTH,BBOXHEIGHT)
BUPPERMID=((WINDOWWIDTH-CUBEWIDTH)/2+0+CUBEWIDTH*1.25+GAPRUN+BBOXWIDTH,(WINDOWHEIGHT-CUBEHEIGHT)/2+CUBEHEIGHT*1.25,BBOXWIDTH,BBOXHEIGHT)
BUPPERRIGHT=((WINDOWWIDTH-CUBEWIDTH)/2+0+CUBEWIDTH*1.25+GAPRUN*2+BBOXWIDTH*2,(WINDOWHEIGHT-CUBEHEIGHT)/2+CUBEHEIGHT*1.25,BBOXWIDTH,BBOXHEIGHT)
BMIDLEFT=((WINDOWWIDTH-CUBEWIDTH)/2+CUBEWIDTH*1.25,(WINDOWHEIGHT-CUBEHEIGHT)/2+CUBEHEIGHT*1.25+GAPRISE+BBOXHEIGHT,BBOXWIDTH,BBOXHEIGHT)
BMIDMID=((WINDOWWIDTH-CUBEWIDTH)/2+0+CUBEWIDTH*1.25+GAPRUN+BBOXWIDTH,(WINDOWHEIGHT-CUBEHEIGHT)/2+CUBEHEIGHT*1.25+GAPRISE+BBOXHEIGHT,BBOXWIDTH,BBOXHEIGHT)
BMIDRIGHT=((WINDOWWIDTH-CUBEWIDTH)/2+0+CUBEWIDTH*1.25+GAPRUN*2+BBOXWIDTH*2,(WINDOWHEIGHT-CUBEHEIGHT)/2+CUBEHEIGHT*1.25+GAPRISE+BBOXHEIGHT,BBOXWIDTH,BBOXHEIGHT)
BBOTLEFT=((WINDOWWIDTH-CUBEWIDTH)/2+CUBEWIDTH*1.25,(WINDOWHEIGHT-CUBEHEIGHT)/2+CUBEHEIGHT*1.25+GAPRISE*2+BBOXHEIGHT*2,BBOXWIDTH,BBOXHEIGHT)
BBOTMID=((WINDOWWIDTH-CUBEWIDTH)/2+0+CUBEWIDTH*1.25+GAPRUN+BBOXWIDTH,(WINDOWHEIGHT-CUBEHEIGHT)/2+CUBEHEIGHT*1.25+GAPRISE*2+BBOXHEIGHT*2,BBOXWIDTH,BBOXHEIGHT)
BBOTRIGHT=((WINDOWWIDTH-CUBEWIDTH)/2+0+CUBEWIDTH*1.25+GAPRUN*2+BBOXWIDTH*2,(WINDOWHEIGHT-CUBEHEIGHT)/2+CUBEHEIGHT*1.25+GAPRISE*2+BBOXHEIGHT*2,BBOXWIDTH,BBOXHEIGHT)
def DRAWCUBE():
pygame.draw.rect(DISPLAYSURF, CUBE[0][0][0], (FUPPERLEFT))
pygame.draw.rect(DISPLAYSURF, CUBE[0][0][1], (FUPPERMID))
pygame.draw.rect(DISPLAYSURF, CUBE[0][0][2], (FUPPERRIGHT))
pygame.draw.rect(DISPLAYSURF, CUBE[0][1][0], (FMIDLEFT))
pygame.draw.rect(DISPLAYSURF, CUBE[0][1][1], (FMIDMID))
pygame.draw.rect(DISPLAYSURF, CUBE[0][1][2], (FMIDRIGHT))
pygame.draw.rect(DISPLAYSURF, CUBE[0][2][0], (FBOTLEFT))
pygame.draw.rect(DISPLAYSURF, CUBE[0][2][1], (FBOTMID))
pygame.draw.rect(DISPLAYSURF, CUBE[0][2][2], (FBOTRIGHT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SRIGHT][RTOP][CLEFT], (RUPPERLEFT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SRIGHT][RTOP][CMID], (RUPPERMID))
pygame.draw.polygon(DISPLAYSURF,CUBE[SRIGHT][RTOP][CRIGHT], (RUPPERRIGHT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SRIGHT][RMID][CLEFT], (RMIDLEFT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SRIGHT][RMID][CMID], (RMIDMID))
pygame.draw.polygon(DISPLAYSURF,CUBE[SRIGHT][RMID][CRIGHT], (RMIDRIGHT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SRIGHT][RBOT][CLEFT], (RBOTLEFT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SRIGHT][RBOT][CMID], (RBOTMID))
pygame.draw.polygon(DISPLAYSURF,CUBE[SRIGHT][RBOT][CRIGHT], (RBOTRIGHT))
pygame.draw.polygon(DISPLAYSURF,CUBE[STOP][RBOT][CLEFT], (TBOTLEFT))
pygame.draw.polygon(DISPLAYSURF,CUBE[STOP][RMID][CLEFT], (TMIDLEFT))
pygame.draw.polygon(DISPLAYSURF,CUBE[STOP][RTOP][CLEFT], (TUPPERLEFT))
pygame.draw.polygon(DISPLAYSURF,CUBE[STOP][RBOT][CMID], (TBOTMID))
pygame.draw.polygon(DISPLAYSURF,CUBE[STOP][RMID][CMID], (TMIDMID))
pygame.draw.polygon(DISPLAYSURF,CUBE[STOP][RTOP][CMID], (TUPPERMID))
pygame.draw.polygon(DISPLAYSURF,CUBE[STOP][RBOT][CRIGHT], (TBOTRIGHT))
pygame.draw.polygon(DISPLAYSURF,CUBE[STOP][RMID][CRIGHT], (TMIDRIGHT))
pygame.draw.polygon(DISPLAYSURF,CUBE[STOP][RTOP][CRIGHT], (TUPPERRIGHT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SLEFT][RTOP][CLEFT], (LUPPERLEFT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SLEFT][RTOP][CMID], (LUPPERMID))
pygame.draw.polygon(DISPLAYSURF,CUBE[SLEFT][RTOP][CRIGHT], (LUPPERRIGHT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SLEFT][RMID][CLEFT], (LMIDLEFT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SLEFT][RMID][CMID], (LMIDMID))
pygame.draw.polygon(DISPLAYSURF,CUBE[SLEFT][RMID][CRIGHT], (LMIDRIGHT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SLEFT][RBOT][CLEFT], (LBOTLEFT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SLEFT][RBOT][CMID], (LBOTMID))
pygame.draw.polygon(DISPLAYSURF,CUBE[SLEFT][RBOT][CRIGHT], (LBOTRIGHT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SUNDER][RBOT][CLEFT], (UBOTLEFT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SUNDER][RMID][CLEFT], (UMIDLEFT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SUNDER][RTOP][CLEFT], (UUPPERLEFT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SUNDER][RBOT][CMID], (UBOTMID))
pygame.draw.polygon(DISPLAYSURF,CUBE[SUNDER][RMID][CMID], (UMIDMID))
pygame.draw.polygon(DISPLAYSURF,CUBE[SUNDER][RTOP][CMID], (UUPPERMID))
pygame.draw.polygon(DISPLAYSURF,CUBE[SUNDER][RBOT][CRIGHT], (UBOTRIGHT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SUNDER][RMID][CRIGHT], (UMIDRIGHT))
pygame.draw.polygon(DISPLAYSURF,CUBE[SUNDER][RTOP][CRIGHT], (UUPPERRIGHT))
pygame.draw.rect(DISPLAYSURF, CUBE[SBACK][RTOP][CRIGHT], (BUPPERLEFT))
pygame.draw.rect(DISPLAYSURF, CUBE[SBACK][RTOP][CMID], (BUPPERMID))
pygame.draw.rect(DISPLAYSURF, CUBE[SBACK][RTOP][CLEFT], (BUPPERRIGHT))
pygame.draw.rect(DISPLAYSURF, CUBE[SBACK][RMID][CRIGHT], (BMIDLEFT))
pygame.draw.rect(DISPLAYSURF, CUBE[SBACK][RMID][CMID], (BMIDMID))
pygame.draw.rect(DISPLAYSURF, CUBE[SBACK][RMID][CLEFT], (BMIDRIGHT))
pygame.draw.rect(DISPLAYSURF, CUBE[SBACK][RBOT][CRIGHT], (BBOTLEFT))
pygame.draw.rect(DISPLAYSURF, CUBE[SBACK][RBOT][CMID], (BBOTMID))
pygame.draw.rect(DISPLAYSURF, CUBE[SBACK][RBOT][CLEFT], (BBOTRIGHT))