diff options
author | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2017-10-17 21:29:03 +0700 |
---|---|---|
committer | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2017-10-17 21:29:03 +0700 |
commit | e879dcf58dc03ae6730d925675ae6ee6f9733e71 (patch) | |
tree | 31afa82e88667f7db220b2cf3854e07c3d08bb89 /brutalmaze/constants.py | |
parent | 22bb77f9184b813bf0841a0939546d5eeb0c58e3 (diff) | |
download | brutalmaze-e879dcf58dc03ae6730d925675ae6ee6f9733e71.tar.gz |
Optimize maze regeneration and show score
Diffstat (limited to 'brutalmaze/constants.py')
-rw-r--r-- | brutalmaze/constants.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/brutalmaze/constants.py b/brutalmaze/constants.py index 367bcb0..427226e 100644 --- a/brutalmaze/constants.py +++ b/brutalmaze/constants.py @@ -32,7 +32,8 @@ FPS = 30 SIZE = 400, 400 MAZE_SIZE = 10 ROAD_WIDTH = 5 -MIDDLE = (MAZE_SIZE + (MAZE_SIZE&1) - 1)*ROAD_WIDTH + (ROAD_WIDTH >> 1) +CELL_WIDTH = ROAD_WIDTH * 2 +MIDDLE = (MAZE_SIZE + MAZE_SIZE%2 - 1)*ROAD_WIDTH + ROAD_WIDTH//2 LAST_ROW = (MAZE_SIZE-1) * ROAD_WIDTH * 2 INIT_SCORE = 208.2016 MOVE_SPEED = 5 # step/grid |