update gitignore and consts to use path var from config.py
This commit is contained in:
parent
1ef4ec94a2
commit
d7b1899dc4
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@
|
|||||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
src/config.py
|
||||||
.idea
|
.idea
|
||||||
# User-specific stuff
|
# User-specific stuff
|
||||||
.idea/**/workspace.xml
|
.idea/**/workspace.xml
|
||||||
|
10
src/const.py
10
src/const.py
@ -1,14 +1,16 @@
|
|||||||
from pygame import image
|
from pygame import image
|
||||||
|
|
||||||
|
from config import main_path
|
||||||
|
|
||||||
WIDTH = 800
|
WIDTH = 800
|
||||||
HEIGHT = 800
|
HEIGHT = 800
|
||||||
|
|
||||||
IMAGES = []
|
IMAGES = []
|
||||||
for img in ['grass_01', 'grass_02', 'grass_mine_01', 'grass_mine_02', 'grass_rock_01', 'grass_rock_02']:
|
for img in ['grass_01', 'grass_02', 'grass_mine_01', 'grass_mine_02', 'grass_rock_01', 'grass_rock_02']:
|
||||||
IMAGES.append(image.load('C:/Users/matix/Documents/Python/Saper/images/Tiles/' + img + ".png"))
|
IMAGES.append(image.load(main_path + 'images/Tiles/' + img + ".png"))
|
||||||
|
|
||||||
ICON = 'C:/Users/matix/Documents/Python/Saper/images/mine_icon.png'
|
ICON = main_path + 'images/mine_icon.png'
|
||||||
SAPPER_IDLE = image.load('C:/Users/matix/Documents/Python/Saper/images/sapper_idle/cpt_bomba.png')
|
SAPPER_IDLE = image.load(main_path + 'images/sapper_idle/cpt_bomba.png')
|
||||||
|
|
||||||
SAPPER_RUNNING = []
|
SAPPER_RUNNING = []
|
||||||
"""for img in [
|
"""for img in [
|
||||||
@ -25,7 +27,7 @@ for img in [
|
|||||||
'cpt_bomba_left',
|
'cpt_bomba_left',
|
||||||
'cpt_bomba_right',
|
'cpt_bomba_right',
|
||||||
]:
|
]:
|
||||||
SAPPER_RUNNING.append(image.load('C:/Users/matix/Documents/Python/Saper/images/sapper_idle/' + img + ".png"))
|
SAPPER_RUNNING.append(image.load(main_path + 'images/sapper_idle/' + img + ".png"))
|
||||||
|
|
||||||
DEFAULT_FIELD = [
|
DEFAULT_FIELD = [
|
||||||
[1, 3, 4, 5, 0, 1, 2, 3, 2, 0],
|
[1, 3, 4, 5, 0, 1, 2, 3, 2, 0],
|
||||||
|
Loading…
Reference in New Issue
Block a user