constants path refactor
This commit is contained in:
parent
bf0760588c
commit
699174bc6d
@ -1,4 +1,5 @@
|
|||||||
import pygame
|
import pygame
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
# VARIABLE STARTS WITH ... IF IT'S
|
# VARIABLE STARTS WITH ... IF IT'S
|
||||||
@ -12,7 +13,7 @@ import pygame
|
|||||||
# ================= #
|
# ================= #
|
||||||
|
|
||||||
V_NAME_OF_WINDOW = "MineFusion TM"
|
V_NAME_OF_WINDOW = "MineFusion TM"
|
||||||
|
ASSETS_DIR = os.path.join("resources", "assets")
|
||||||
|
|
||||||
V_TILE_SIZE = 60
|
V_TILE_SIZE = 60
|
||||||
V_GRID_VER_TILES = V_GRID_HOR_TILES = 10 # vertical, horizontal
|
V_GRID_VER_TILES = V_GRID_HOR_TILES = 10 # vertical, horizontal
|
||||||
@ -36,78 +37,78 @@ SCREEN = pygame.display.set_mode\
|
|||||||
|
|
||||||
ASSET_BACKGROUND = pygame.transform.scale\
|
ASSET_BACKGROUND = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load('resources/assets/new_grid.png'),
|
pygame.image.load(os.path.join(ASSETS_DIR, "new_grid.png")),
|
||||||
(V_MINEFIELD_WIDTH, V_MINEFIELD_WIDTH)
|
(V_MINEFIELD_WIDTH, V_MINEFIELD_WIDTH)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_SAPPER = pygame.transform.scale\
|
ASSET_SAPPER = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load( 'resources/assets/sapper.png' ),
|
pygame.image.load(os.path.join(ASSETS_DIR, "sapper.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_MINE_A = pygame.transform.scale\
|
ASSET_MINE_A = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load( 'resources/assets/mine_a.png' ),
|
pygame.image.load(os.path.join(ASSETS_DIR, "mine_a.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_MINE_B = pygame.transform.scale\
|
ASSET_MINE_B = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load( 'resources/assets/mine_b.png' ),
|
pygame.image.load(os.path.join(ASSETS_DIR, "mine_b.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_MINE_F = pygame.transform.scale\
|
ASSET_MINE_F = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load( 'resources/assets/mine_f.png' ),
|
pygame.image.load(os.path.join(ASSETS_DIR, "mine_f.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_MINE_K = pygame.transform.scale\
|
ASSET_MINE_K = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load( 'resources/assets/mine_k.png' ),
|
pygame.image.load(os.path.join(ASSETS_DIR, "mine_k.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_TILE_ORANGE = pygame.transform.scale\
|
ASSET_TILE_ORANGE = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load( 'resources/assets/tile_orange.png' ),
|
pygame.image.load(os.path.join(ASSETS_DIR, "tile_orange.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_TILE_RED = pygame.transform.scale\
|
ASSET_TILE_RED = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load( 'resources/assets/tile_red.png' ),
|
pygame.image.load(os.path.join(ASSETS_DIR, "tile_red.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_TILE_BLUE = pygame.transform.scale\
|
ASSET_TILE_BLUE = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load( 'resources/assets/tile_blue.png' ),
|
pygame.image.load(os.path.join(ASSETS_DIR, "tile_blue.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_TILE_PURPLE = pygame.transform.scale\
|
ASSET_TILE_PURPLE = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load( 'resources/assets/tile_purple.png' ),
|
pygame.image.load(os.path.join(ASSETS_DIR, "tile_purple.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_TILE_GREEN = pygame.transform.scale\
|
ASSET_TILE_GREEN = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load( 'resources/assets/tile_green.png' ),
|
pygame.image.load(os.path.join(ASSETS_DIR, "tile_green.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_TILE_YELLOW = pygame.transform.scale\
|
ASSET_TILE_YELLOW = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load( 'resources/assets/tile_yellow.png' ),
|
pygame.image.load(os.path.join(ASSETS_DIR, "tile_yellow.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_TILE_WHITE = pygame.transform.scale\
|
ASSET_TILE_WHITE = pygame.transform.scale\
|
||||||
(
|
(
|
||||||
pygame.image.load( 'resources/assets/tile_white.png' ),
|
pygame.image.load(os.path.join(ASSETS_DIR, "tile_white.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
Loading…
Reference in New Issue
Block a user