forked from BattlesnakeOfficial/starter-snake-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathglobal_variables.py
More file actions
21 lines (17 loc) · 749 Bytes
/
global_variables.py
File metadata and controls
21 lines (17 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
Home for global variables describing board state or otherwise.
Maybe I want this as an object - probably eventually, but lets do this quick
and dirty for now, even though it feels awful, this is the first step in
iterative development! Don't commit to a particular object oriented structure
until you know the problem space Aurora!
"""
# Origin of the board is bottom-left-hand corner always.
BOARD_MINIMUM_X = 0
BOARD_MINIMUM_Y = 0
# Set at start so we know how big the board is, and how far is too far
BOARD_MAXIMUM_X = 0
BOARD_MAXIMUM_Y = 0
# Use a dictionary to avoid if/else when determining the change in position
MOVE_LOOKUP = {"left": -1, "right": 1, "up": 1, "down": -1}
# Keep track on if the game is running or not
GAME_ON = False