-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlcdefinitions.js
35 lines (35 loc) · 1.1 KB
/
lcdefinitions.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
function LCDefinitions(DimX, DimY, CellSize) {
"use strict";
// ------------------------------------------------------------
this.DimensionX = parseInt(DimX);
this.DimensionY = parseInt(DimY);
this.CellSize = parseInt(CellSize);
this.Winner = parseInt(parseInt(DimX) * parseInt(DimY) / 2 + 1);
// ------------------------------------------------------------
this.ReInit = function(DimX, DimY, CellSize) {
this.DimensionX = parseInt(DimX);
this.DimensionY = parseInt(DimY);
this.CellSize = parseInt(CellSize);
this.Winner = parseInt(parseInt(DimX) * parseInt(DimY) / 2 + 1);
};
// ------------------------------------------------------------
this.Colors = ["blue", "cyan", "green", "red", "yellow"];
// ------------------------------------------------------------
this.Offsets = [{
DX: 0,
DY: 1
},
{
DX: 1,
DY: 0
},
{
DX: 0,
DY: -1
},
{
DX: -1,
DY: 0
}
];
}