Browse Source

Change size of map

master
Elis Axelsson 3 years ago
parent
commit
6e17a6e82e
2 changed files with 20 additions and 20 deletions
  1. +18
    -18
      classes/settings.py
  2. +2
    -2
      main.py

+ 18
- 18
classes/settings.py View File

@ -1,11 +1,11 @@
class Settings:
def __init__(self):
self.size = 640, 480
self.gridSize = 40
self.size = 1280, 720
self.gridSize = self.size[1] / 12
self.enemyStart = (0, 1.5 * self.gridSize)
self.enemyPath = [
(14, 1),
(14, 4),
(15, 1),
(15, 4),
(1, 4),
# Changing pattern here
@ -20,27 +20,27 @@ class Settings:
(13, 10),
# Exit labyrinth
(16, 10)
(17, 10)
]
# Legend of map:
# 1 = Build spot
# 2 = Non-Build spot
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
self.map = [
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], # 0
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], # 1
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1], # 2
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1], # 3
[1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], # 4
[1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], # 5
[1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], # 6
[1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1], # 7
[1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1], # 8
[1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1], # 9
[1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2], # 10
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], # 11
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], # 0
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], # 1
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1], # 2
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1], # 3
[1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], # 4
[1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], # 5
[1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], # 6
[1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1], # 7
[1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1], # 8
[1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1], # 9
[1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2], # 10
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], # 11
]
# Define map colors


+ 2
- 2
main.py View File

@ -23,8 +23,8 @@ projectiles = []
# Add sample ogre and bubblers
towers.append(Bubbler((0, 0)))
towers.append(Bubbler((11, 0)))
towers.append(Bubbler((0, 15)))
towers.append(Bubbler((11, 15)))
towers.append(Bubbler((0, 16)))
towers.append(Bubbler((11, 16)))
while True:
for event in pygame.event.get():


Loading…
Cancel
Save