minor main and constants refactors
This commit is contained in:
parent
cb61ee5147
commit
bf0760588c
5
main.py
5
main.py
@ -8,7 +8,7 @@ import event_interpreter
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main():
|
||||
|
||||
|
||||
pygame.init()
|
||||
@ -62,3 +62,6 @@ if __name__ == "__main__":
|
||||
running = False
|
||||
|
||||
else: event_interpreter.interpret( event )
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
@ -17,6 +17,8 @@ V_NAME_OF_WINDOW = "MineFusion TM"
|
||||
V_TILE_SIZE = 60
|
||||
V_GRID_VER_TILES = V_GRID_HOR_TILES = 10 # vertical, horizontal
|
||||
V_SCREEN_PADDING = 10
|
||||
V_MINEFIELD_HEIGHT = V_TILE_SIZE * V_GRID_VER_TILES
|
||||
V_MINEFIELD_WIDTH = V_TILE_SIZE * V_GRID_HOR_TILES
|
||||
|
||||
SCREEN = pygame.display.set_mode\
|
||||
(
|
||||
@ -35,77 +37,77 @@ SCREEN = pygame.display.set_mode\
|
||||
ASSET_BACKGROUND = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load('resources/assets/new_grid.png'),
|
||||
( 600, 600 )
|
||||
(V_MINEFIELD_WIDTH, V_MINEFIELD_WIDTH)
|
||||
)
|
||||
|
||||
ASSET_SAPPER = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load( 'resources/assets/sapper.png' ),
|
||||
( 60, 60 )
|
||||
(V_TILE_SIZE, V_TILE_SIZE)
|
||||
)
|
||||
|
||||
ASSET_MINE_A = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load( 'resources/assets/mine_a.png' ),
|
||||
( 60, 60 )
|
||||
(V_TILE_SIZE, V_TILE_SIZE)
|
||||
)
|
||||
|
||||
ASSET_MINE_B = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load( 'resources/assets/mine_b.png' ),
|
||||
( 60, 60 )
|
||||
(V_TILE_SIZE, V_TILE_SIZE)
|
||||
)
|
||||
|
||||
ASSET_MINE_F = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load( 'resources/assets/mine_f.png' ),
|
||||
( 60, 60 )
|
||||
(V_TILE_SIZE, V_TILE_SIZE)
|
||||
)
|
||||
|
||||
ASSET_MINE_K = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load( 'resources/assets/mine_k.png' ),
|
||||
( 60, 60 )
|
||||
(V_TILE_SIZE, V_TILE_SIZE)
|
||||
)
|
||||
|
||||
ASSET_TILE_ORANGE = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load( 'resources/assets/tile_orange.png' ),
|
||||
( 60, 60 )
|
||||
(V_TILE_SIZE, V_TILE_SIZE)
|
||||
)
|
||||
|
||||
ASSET_TILE_RED = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load( 'resources/assets/tile_red.png' ),
|
||||
( 60, 60 )
|
||||
(V_TILE_SIZE, V_TILE_SIZE)
|
||||
)
|
||||
|
||||
ASSET_TILE_BLUE = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load( 'resources/assets/tile_blue.png' ),
|
||||
( 60, 60 )
|
||||
(V_TILE_SIZE, V_TILE_SIZE)
|
||||
)
|
||||
|
||||
ASSET_TILE_PURPLE = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load( 'resources/assets/tile_purple.png' ),
|
||||
( 60, 60 )
|
||||
(V_TILE_SIZE, V_TILE_SIZE)
|
||||
)
|
||||
|
||||
ASSET_TILE_GREEN = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load( 'resources/assets/tile_green.png' ),
|
||||
( 60, 60 )
|
||||
(V_TILE_SIZE, V_TILE_SIZE)
|
||||
)
|
||||
|
||||
ASSET_TILE_YELLOW = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load( 'resources/assets/tile_yellow.png' ),
|
||||
( 60, 60 )
|
||||
(V_TILE_SIZE, V_TILE_SIZE)
|
||||
)
|
||||
|
||||
ASSET_TILE_WHITE = pygame.transform.scale\
|
||||
(
|
||||
pygame.image.load( 'resources/assets/tile_white.png' ),
|
||||
( 60, 60 )
|
||||
(V_TILE_SIZE, V_TILE_SIZE)
|
||||
)
|
Loading…
Reference in New Issue
Block a user