refactor: cleaner constants
This commit is contained in:
parent
9c23ea4a3d
commit
e81dd05024
9
constants.py
Normal file
9
constants.py
Normal file
@ -0,0 +1,9 @@
|
||||
GAME_TITLE = 'WMICraft'
|
||||
WINDOW_HEIGHT = 900
|
||||
WINDOW_WIDTH = 900
|
||||
GRID_CELL_PADDING = 3
|
||||
GRID_CELL_WIDTH = 42
|
||||
GRID_CELL_HEIGHT = 42
|
||||
ROWS = 20
|
||||
COLUMNS = 20
|
||||
FPS_COUNT = 60
|
12
game.py
12
game.py
@ -2,17 +2,7 @@ import pygame
|
||||
from glob import glob
|
||||
|
||||
from grid import Grid
|
||||
|
||||
GAME_TITLE = 'WMICraft'
|
||||
WINDOW_HEIGHT = 900
|
||||
WINDOW_WIDTH = 900
|
||||
GRID_CELL_PADDING = 3
|
||||
GRID_CELL_WIDTH = 42
|
||||
GRID_CELL_HEIGHT = 42
|
||||
ROWS = 20
|
||||
COLUMNS = 20
|
||||
FPS_COUNT = 60
|
||||
GREEN = (0, 255, 0)
|
||||
from constants import GAME_TITLE, WINDOW_WIDTH, WINDOW_HEIGHT, FPS_COUNT
|
||||
|
||||
|
||||
class Game:
|
||||
|
Loading…
Reference in New Issue
Block a user