robotic assets
@ -1,11 +1,11 @@
|
|||||||
# module for abstarct classes
|
# module for abstract classes
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
|
|
||||||
# type hints
|
# type hints
|
||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
|
|
||||||
# Mine cannot be instatinated
|
# Mine cannot be instantiated
|
||||||
# all abstarct methods must be implemented in derived classes
|
# all abstract methods must be implemented in derived classes
|
||||||
|
|
||||||
|
|
||||||
class Mine(ABC):
|
class Mine(ABC):
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import json
|
import json
|
||||||
import ctypes #
|
import ctypes
|
||||||
import agent as ag
|
import agent as ag
|
||||||
import project_constants as const
|
import project_constants as const
|
||||||
import tile as tl
|
import tile as tl
|
||||||
|
@ -19,8 +19,8 @@ V_FPS = 60
|
|||||||
V_TILE_SIZE = 60
|
V_TILE_SIZE = 60
|
||||||
V_GRID_VER_TILES = V_GRID_HOR_TILES = 10 # vertical (number of rows), horizontal (number of columns)
|
V_GRID_VER_TILES = V_GRID_HOR_TILES = 10 # vertical (number of rows), horizontal (number of columns)
|
||||||
V_SCREEN_PADDING = 10
|
V_SCREEN_PADDING = 10
|
||||||
V_MINEFIELD_HEIGHT = V_TILE_SIZE * V_GRID_VER_TILES
|
V_WINDOW_HEIGHT = V_TILE_SIZE * V_GRID_VER_TILES
|
||||||
V_MINEFIELD_WIDTH = V_TILE_SIZE * V_GRID_HOR_TILES
|
V_WINDOW_WIDTH = V_TILE_SIZE * V_GRID_HOR_TILES
|
||||||
|
|
||||||
SCREEN = pygame.display.set_mode(
|
SCREEN = pygame.display.set_mode(
|
||||||
(
|
(
|
||||||
@ -71,6 +71,7 @@ STRUCT_MINE_ATTRIBUTES = {
|
|||||||
# used for random mine generation
|
# used for random mine generation
|
||||||
# int - integral number
|
# int - integral number
|
||||||
# (int, int) - index "row,column" where row=int and column=int (used exclusively for chained mine)
|
# (int, int) - index "row,column" where row=int and column=int (used exclusively for chained mine)
|
||||||
|
|
||||||
STRUCT_MINE_ATTRIBUTE_TYPES = {
|
STRUCT_MINE_ATTRIBUTE_TYPES = {
|
||||||
"standard": [],
|
"standard": [],
|
||||||
"chained": [],
|
"chained": [],
|
||||||
@ -80,19 +81,26 @@ STRUCT_MINE_ATTRIBUTE_TYPES = {
|
|||||||
# ============== #
|
# ============== #
|
||||||
# ==== MAPS ==== #
|
# ==== MAPS ==== #
|
||||||
# ============== #
|
# ============== #
|
||||||
|
|
||||||
MAP_RANDOM_10x10 = os.path.join("resources", "minefields", "secondmap.json")
|
MAP_RANDOM_10x10 = os.path.join("resources", "minefields", "secondmap.json")
|
||||||
|
|
||||||
|
|
||||||
# ============== #
|
# ============== #
|
||||||
# === ASSETS === #
|
# === ASSETS === #
|
||||||
# ============== #
|
# ============== #
|
||||||
|
|
||||||
ASSET_BACKGROUND = pygame.transform.scale(
|
ASSET_BACKGROUND = pygame.transform.scale(
|
||||||
pygame.image.load(os.path.join(ASSETS_DIR, "new_grid.png")),
|
pygame.image.load(os.path.join(ASSETS_DIR, "new_grid.png")),
|
||||||
(V_MINEFIELD_WIDTH, V_MINEFIELD_WIDTH)
|
(V_WINDOW_WIDTH, V_WINDOW_WIDTH)
|
||||||
)
|
)
|
||||||
|
|
||||||
ASSET_SAPPER = pygame.transform.scale(
|
ASSET_SAPPER = pygame.transform.scale(
|
||||||
pygame.image.load(os.path.join(ASSETS_DIR, "sapper.png")),
|
pygame.image.load(os.path.join(ASSETS_DIR, "robot_sapper.png")),
|
||||||
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
|
)
|
||||||
|
|
||||||
|
ASSET_WALL = pygame.transform.scale(
|
||||||
|
pygame.image.load(os.path.join(ASSETS_DIR, "brick_wall.png")),
|
||||||
(V_TILE_SIZE, V_TILE_SIZE)
|
(V_TILE_SIZE, V_TILE_SIZE)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
BIN
resources/assets/brick_wall.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/assets/chain_numbers/chain_number_0.png
Normal file
After Width: | Height: | Size: 84 B |
BIN
resources/assets/chain_numbers/chain_number_1.png
Normal file
After Width: | Height: | Size: 88 B |
BIN
resources/assets/chain_numbers/chain_number_10.png
Normal file
After Width: | Height: | Size: 85 B |
BIN
resources/assets/chain_numbers/chain_number_11.png
Normal file
After Width: | Height: | Size: 91 B |
BIN
resources/assets/chain_numbers/chain_number_12.png
Normal file
After Width: | Height: | Size: 90 B |
BIN
resources/assets/chain_numbers/chain_number_13.png
Normal file
After Width: | Height: | Size: 89 B |
BIN
resources/assets/chain_numbers/chain_number_14.png
Normal file
After Width: | Height: | Size: 89 B |
BIN
resources/assets/chain_numbers/chain_number_15.png
Normal file
After Width: | Height: | Size: 85 B |
BIN
resources/assets/chain_numbers/chain_number_2.png
Normal file
After Width: | Height: | Size: 81 B |
BIN
resources/assets/chain_numbers/chain_number_3.png
Normal file
After Width: | Height: | Size: 80 B |
BIN
resources/assets/chain_numbers/chain_number_4.png
Normal file
After Width: | Height: | Size: 87 B |
BIN
resources/assets/chain_numbers/chain_number_5.png
Normal file
After Width: | Height: | Size: 87 B |
BIN
resources/assets/chain_numbers/chain_number_6.png
Normal file
After Width: | Height: | Size: 86 B |
BIN
resources/assets/chain_numbers/chain_number_7.png
Normal file
After Width: | Height: | Size: 78 B |
BIN
resources/assets/chain_numbers/chain_number_8.png
Normal file
After Width: | Height: | Size: 86 B |
BIN
resources/assets/chain_numbers/chain_number_9.png
Normal file
After Width: | Height: | Size: 88 B |
BIN
resources/assets/chained_mine.png
Normal file
After Width: | Height: | Size: 406 B |
BIN
resources/assets/explosion_100.gif
Normal file
After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 210 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 198 B |
BIN
resources/assets/mine.png
Normal file
After Width: | Height: | Size: 196 B |
BIN
resources/assets/robot_sapper.png
Normal file
After Width: | Height: | Size: 379 B |
BIN
resources/assets/time_mine.png
Normal file
After Width: | Height: | Size: 301 B |
BIN
resources/assets/time_numbers/number0.png
Normal file
After Width: | Height: | Size: 81 B |
BIN
resources/assets/time_numbers/number1.png
Normal file
After Width: | Height: | Size: 90 B |
BIN
resources/assets/time_numbers/number2.png
Normal file
After Width: | Height: | Size: 96 B |
BIN
resources/assets/time_numbers/number3.png
Normal file
After Width: | Height: | Size: 92 B |
BIN
resources/assets/time_numbers/number4.png
Normal file
After Width: | Height: | Size: 87 B |
BIN
resources/assets/time_numbers/number5.png
Normal file
After Width: | Height: | Size: 84 B |
BIN
resources/assets/time_numbers/number6.png
Normal file
After Width: | Height: | Size: 91 B |
BIN
resources/assets/time_numbers/number7.png
Normal file
After Width: | Height: | Size: 77 B |
BIN
resources/assets/time_numbers/number8.png
Normal file
After Width: | Height: | Size: 95 B |
BIN
resources/assets/time_numbers/number9.png
Normal file
After Width: | Height: | Size: 87 B |