-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathConfigurations.py
167 lines (159 loc) · 6.44 KB
/
Configurations.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
"""
Configuration
"""
import os.path
from kivy.uix.image import Image as CoreImage
# SOURCES for maps textures.
SOURCES = {
'wall': './resources/blocks/wall.png',
'air': './resources/blocks/air.png',
'wall_left': './resources/blocks/wall_left.png',
'wall_right': './resources/blocks/wall_right.png',
'wall_top': './resources/blocks/wall_top.png',
'wall_bottom': './resources/blocks/wall_bottom.png',
'angle_left_bottom': './resources/blocks/angle_left_bottom.png',
'angle_left_top': './resources/blocks/angle_left_top.png',
'angle_right_bottom': './resources/blocks/angle_right_bottom.png',
'angle_right_top': './resources/blocks/angle_right_top.png',
'angle_top': './resources/blocks/angle_top.png',
'angle_bottom': './resources/blocks/angle_bottom.png',
'angle_right': './resources/blocks/angle_right.png',
'angle_left': './resources/blocks/angle_left.png',
'double_wall_horizontal': './resources/blocks/double_wall_horizontal.png',
'double_wall_vertical': './resources/blocks/double_wall_vertical.png',
'block': './resources/blocks/block.png',
'point': './resources/other/point.png',
'trace': './resources/other/trace.png',
'background': './resources/other/background_map_canvas.png'
}
for source_name in sorted(SOURCES):
if not os.path.isfile(SOURCES[source_name]):
raise ValueError("File %s does not exist." % SOURCES[source_name])
# Textures dictionary, format : (key, texture).
TEXTURES = dict([
('background', CoreImage(source=SOURCES['background']).texture),
('trace', CoreImage(source=SOURCES['trace']).texture),
('block', CoreImage(source=SOURCES['block']).texture),
('point', CoreImage(source=SOURCES['point']).texture),
('W', CoreImage(source=SOURCES['wall']).texture),
('A', CoreImage(source=SOURCES['air']).texture),
('L', CoreImage(source=SOURCES['wall_left']).texture),
('R', CoreImage(source=SOURCES['wall_right']).texture),
('T', CoreImage(source=SOURCES['wall_top']).texture),
('B', CoreImage(source=SOURCES['wall_bottom']).texture),
('LB', CoreImage(source=SOURCES['angle_left_bottom']).texture),
('LT', CoreImage(source=SOURCES['angle_left_top']).texture),
('RB', CoreImage(source=SOURCES['angle_right_bottom']).texture),
('RT', CoreImage(source=SOURCES['angle_right_top']).texture),
('AT', CoreImage(source=SOURCES['angle_top']).texture),
('AB', CoreImage(source=SOURCES['angle_bottom']).texture),
('AR', CoreImage(source=SOURCES['angle_right']).texture),
('AL', CoreImage(source=SOURCES['angle_left']).texture),
('H', CoreImage(source=SOURCES['double_wall_horizontal']).texture),
('V', CoreImage(source=SOURCES['double_wall_vertical']).texture)
])
# Authorization dictionary, format : boolean list {left, right, top, bot}
AUTHORIZATIONS = dict([
('W', [False, False, False, False]),
('A', [True, True, True, True]),
('L', [False, True, True, True]),
('R', [True, False, True, True]),
('T', [True, True, False, True]),
('B', [True, True, True, False]),
('LB', [False, True, True, False]),
('LT', [False, True, False, True]),
('RB', [True, False, True, False]),
('RT', [True, False, False, True]),
('AT', [False, False, False, True]),
('AB', [False, False, True, False]),
('AR', [True, False, False, False]),
('AL', [False, True, False, False]),
('H', [True, True, False, False]),
('V', [False, False, True, True]),
])
# Colors dictionary, format : (index, color). Color is R G B A / 360.
COLORS = dict([
('blue_color', [0.37, 0.69, 0.73, 0.9]),
('dark_blue_color', [0.19, 0.19, 0.19, 0.9])
])
# Messages dictionary, format : (index (level), string).
MESSAGES = dict([
('11', "Welcome on 'Scape me !"
"\n"
"\nThe rules are really simple,"
"\nYou must draw a line"
"\nfrom a point to an other."
"\nTo win, you need to go through all squares,"
"\nbut don't go outside of the level borders !"
"\n"
"\nGood luck !"),
('12', "I think you've got the idea !"
"\n"
"\nWell, I must told you"
"\nif you stop before"
"\nyou complete all levels from a set,"
"\nyou will have to do it again."
"\nThus be careful"
"\n"
"\nLet's go !"),
('21', "Nice, you're getting pretty good at this"
"\n"
"\nBut it's gonna get a bit harder from now on,"
"\nYou saw these black squares ?"
"\ndon't touch them !"
"\nwhy ? ahah Try ! you will see !"
"\n"
"\nGood luck !"),
('22', "Good !"
"\n"
"\nNow like in the first set,"
"\nYou must finish all of this !"
"\n"
"\nI will pray for you !"),
('25', "God !"
"\n"
"\nThis one is not an easy one"
"\nbut you could make it"
"\n"
"\nLet's go !"),
('23', "What this ? Something new ?"
"\n"
"\nYou can start where you want !"
"\nand of course stop where you want."
"\nbut the rules don't change"
"\nthrough all squares."
"\n"
"\nI hope you will achieve this one !"),
('31', "Wonderful !"
"\n"
"\nI hope you weren't thinking it's over..."
"\nSo you see these white rectangles ?"
"\nDon't forget what we said for the squares then !"
"\n"
"\nBe happy !"),
('32', "Ok it was an easy one !"
"\n"
"\nlet's continue !"),
('41', "Why those ****ing points always on the border ?"
"\n"
"\nOk let's try this, yeah ! better !"),
('51', "My mum always told me to look out of the box."
"\n"
"\nNow I understand !"),
('52', "HARDER HARDER HARDER"),
('61', "Please do not cry cry I hate that !"),
('62', "\nAhahaha I love to see that"
"\nYou know, I just need 2 minutes"
"\nto made this level ^^"
"\nwhat about you ?"
"\n"
"\nit's ok... it's ok move on..."),
('63', "I said DO NOT CRY !!"),
('71', "So you finally arrive to this last set"
"\n Good luck ! Good luck..."),
('72', "OK ok calm down the game will end to fast !"),
('73', "I say STOP are you angry against me ?"),
('74', "No please No..."),
('75', "OK then... Il a few minutes I will be useless..."
"\n Thanks for player.... Pffff....")
])