forked from BeLuckyDaf/snakes-game-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConstants.java
66 lines (50 loc) · 2.55 KB
/
Constants.java
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
/* Copyright (c) 2021, Gijs Pennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package negasnake;
import snakes.Direction;
public final class Constants {
public static final boolean DEBUG = true;
public static final Direction[] DIR = {Direction.UP, Direction.RIGHT, Direction.DOWN, Direction.LEFT};
public static final int APPLE_TTL = 11;
public static final int DEP_MAX = 32;
public static final int H_WIN = 10_000_000;
public static final int H_DRAW = -9_999_900;
public static final int H_LONGER = 10_000;
public static final int H_APPLE_REACHABLE = 3_000;
public static final int H_POS_CENTER = 2_000;
public static final int H_APPLE_CLOSER = 1_000;
public static final int H_POS_CONTROL = 40;
public static final int INF = 2_000_000_000;
public static final int M_A_DEAD = 0b01;
public static final int M_B_DEAD = 0b10;
public static final int M_COORDINATE = 0x7FFF;
public static final int M_DIR = 0b11;
public static final int S_X = 2;
public static final int S_Y = 17;
public static final int SEQ_LEN_MASK = 0b1111;
public static final int SEQ_LEN_MAX = 12;
public static final int SEQ_NULL = -1;
public static final int T_LEN_AHEAD = 4;
public static final int T_MS_SEARCH = 150;
/**
* Roughly the no. nodes in a ternary tree of height 12 divided by 0.75, the load factor. Note that it is prime.
*/
public static final int TABLE_SIZE = 1_000_003;
/**
* Includes some buffer time, since {@code Thread.sleep} is inaccurate.
*/
public static final int TIMEOUT = 970;
}