created a package for objects, changed ui into a package

This commit is contained in:
s452635 2021-05-23 06:14:12 +02:00
parent b6fa5844fa
commit 7ef7c24339
14 changed files with 12 additions and 13 deletions

View File

@ -3,9 +3,9 @@ import pygame
import project_constants as const import project_constants as const
from assets import asset_constants as asset from assets import asset_constants as asset
from mine_models.standard_mine import StandardMine from objects.mines.standard_mine import StandardMine
from mine_models.chained_mine import ChainedMine from objects.mines.chained_mine import ChainedMine
from mine_models.time_mine import TimeMine from objects.mines.time_mine import TimeMine
# ================================= # # ================================= #

View File

@ -7,7 +7,7 @@ from searching_algorithms import a_star
from minefield import Minefield from minefield import Minefield
from mine_models.time_mine import TimeMine from objects.mines.time_mine import TimeMine
from ui.ui_components_manager import UiComponentsManager from ui.ui_components_manager import UiComponentsManager
from ui.text_box import TextBox from ui.text_box import TextBox
@ -187,7 +187,7 @@ class Game:
self.minefield = self.initial_minefield.__copy__() self.minefield = self.initial_minefield.__copy__()
self.agent = self.initial_minefield.agent self.agent = self.initial_minefield.agent
# initializes ui components and assigns them to attributes # initializes old ui components and assigns them to attributes
def initialize_gui_components(self): def initialize_gui_components(self):
# calculating in game gui coordinates # calculating in game gui coordinates
gui_width = const.V_SIDE_MENU_WIDTH gui_width = const.V_SIDE_MENU_WIDTH

View File

@ -4,12 +4,12 @@ import random
import project_constants as const import project_constants as const
# import tile class # import tile class
from tile import Tile from objects.tile import Tile
# import mine models # import mine models
from mine_models.standard_mine import StandardMine from objects.mines.standard_mine import StandardMine
from mine_models.time_mine import TimeMine from objects.mines.time_mine import TimeMine
from mine_models.chained_mine import ChainedMine from objects.mines.chained_mine import ChainedMine
class JsonGenerator: class JsonGenerator:

View File

@ -1,7 +1,6 @@
import agent as ag
import project_constants as const import project_constants as const
import tile as tl from objects import tile as tl, agent as ag
from mine_models.time_mine import TimeMine from objects.mines.time_mine import TimeMine
import json_generator as jg import json_generator as jg

0
objects/__init__.py Normal file
View File

View File

View File

@ -150,7 +150,7 @@ def get_tile_coordinates(position):
# initializing pygame modules so all instances can be constructed properly # initializing pygame modules so all instances can be constructed properly
pygame.init() pygame.init()
# creating ui components used in menu # creating old ui components used in menu
HIGHLIGHT = pygame.transform.scale( HIGHLIGHT = pygame.transform.scale(
pygame.image.load(os.path.join(DIR_ASSETS, "old_tiles/tile_white.png")), pygame.image.load(os.path.join(DIR_ASSETS, "old_tiles/tile_white.png")),
(V_TILE_SIZE, V_TILE_SIZE) (V_TILE_SIZE, V_TILE_SIZE)

0
ui/__init__.py Normal file
View File