This commit is contained in:
Yakudami 2020-04-28 01:25:27 +02:00
commit 1498ce4336
3 changed files with 9 additions and 2 deletions

View File

@ -24,5 +24,6 @@ COLORS = {
'darkgray': (60, 60, 60), 'darkgray': (60, 60, 60),
'yellow': (235, 235, 0), 'yellow': (235, 235, 0),
'lightgreen': (70, 238, 70), 'lightgreen': (70, 238, 70),
'red': (255, 0, 0) 'red': (255, 0, 0),
'lightblue': (135, 206, 250)
} }

View File

@ -41,6 +41,12 @@ class MainGameFrame:
for x in range(self.warehouse_map.width): for x in range(self.warehouse_map.width):
for y in range(self.warehouse_map.height): for y in range(self.warehouse_map.height):
self.draw_field(x, y) self.draw_field(x, y)
self.draw_target(1, 1)
def draw_target(self, x, y):
target_screen_position = (
(x * TILE_WIDTH) + CIRCLE_CENTER_X, (y * TILE_HEIGHT) + CIRCLE_CENTER_Y)
pygame.draw.circle(self.display, COLORS['lightblue'], target_screen_position, 6)
def draw_field(self, x, y): def draw_field(self, x, y):
current_tile = self.warehouse_map.tiles[x][y] current_tile = self.warehouse_map.tiles[x][y]

View File

@ -50,7 +50,7 @@ class Warehouse:
self.generate_racks() self.generate_racks()
self.open_isolated_areas() self.open_isolated_areas()
self.packages = self.place_packages(no_of_packages) self.packages = self.place_packages(no_of_packages)
self.tiles[1][1] = Tile('floor', 1, 1)
def __str__(self): def __str__(self):
return "Magazyn {}x{}".format(self.width, self.height) return "Magazyn {}x{}".format(self.width, self.height)