-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.js
69 lines (67 loc) · 1.51 KB
/
config.js
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
DEBUG = false;
var GAME_OPTS = {
canvasId : 'game-main',
canvasClass : 'game-clone layer-'
};
var ALPHA = 1;
if (DEBUG === true) {
ALPHA = 0.5;
}
var COLORS = {
laser : '#F00',
grid : '#FF0',
text : '#000',
stroke : '#333',
empty_stroke : '#DDD',
none : 'transparent',
empty : rgba('#BBB', ALPHA),
mirror : rgba('#FFF', ALPHA),
blackhole : rgba('#444', ALPHA),
glass : rgba('#FFF', ALPHA),
prism : rgba('#CCC', ALPHA),
mirror_stuck : rgba('#FFF', ALPHA),
blackhole_stuck : rgba('#444', ALPHA),
glass_stuck : rgba('#FFF', ALPHA)
};
var LAYOUT = {
padding : 1, // left+right space around the grid, in cell size
line : 2,
empty_line : 1,
maxWidth : document.documentElement.clientWidth,
maxHeight : document.documentElement.clientHeight
};
/**
* Example of level config structure
* == side: n, e, s, w
* == dir: ne, se, sw, nw
*/
/*
var emtpy_level = {
rows : 0, columns : 0,
lasers : [
{ cell : 0, side : '', dir : '' }
],
targets : [
{ cell : 0, side : '' }
],
none : [],
cells : [
{ type : 'mirror', arr : [] },
{ type : 'blackhole', arr : [] },
{ type : 'glass', arr : [] },
{ type : 'prism', arr : [] },
{ type : 'mirror_stuck', arr : [] },
{ type : 'blackhole_stuck', arr : [] },
{ type : 'glass_stuck', arr : [] }
],
solution: [
{ type : 'mirror', arr : [] },
{ type : 'blackhole', arr : [] },
{ type : 'glass', arr : [] },
{ type : 'prism', arr : [] },
{ type : 'mirror_stuck', arr : [] },
{ type : 'blackhole_stuck', arr : [] },
{ type : 'glass_stuck', arr : [] }
]
};
*/