diff --git a/resources/images/table2.png b/resources/images/table2.png new file mode 100644 index 0000000..7895472 Binary files /dev/null and b/resources/images/table2.png differ diff --git a/resources/images/table3.png b/resources/images/table3.png new file mode 100644 index 0000000..31869a1 Binary files /dev/null and b/resources/images/table3.png differ diff --git a/src/graphics.py b/src/graphics.py index 9369b74..3210f72 100644 --- a/src/graphics.py +++ b/src/graphics.py @@ -7,11 +7,19 @@ class Graphics: 'floor': pygame.image.load('../resources/images/floor.jpg'), 'table': pygame.image.load('../resources/images/table.png'), 'waiter': pygame.image.load('../resources/images/waiter.png'), + 'table2': pygame.image.load('../resources/images/table2.png'), + 'table3': pygame.image.load('../resources/images/table3.png') } - self.screen = pygame.display.set_mode((700, 750)) self.block_size = 50 + self.height = 15 + self.width = 14 + self.screen = pygame.display.set_mode((self.block_size*self.width, self.block_size*self.height)) def drawBackground(self, matrix): + for y in range(15): + for x in range(14): + self.screen.blit(self.image['floor'], (x * self.block_size, y * self.block_size)) + for y in range(15): for x in range(14): self.screen.blit(self.image[matrix.get_type(x, y)], (x * self.block_size, y * self.block_size)) diff --git a/src/matrix.py b/src/matrix.py index bedfffe..af8d07c 100644 --- a/src/matrix.py +++ b/src/matrix.py @@ -10,7 +10,7 @@ class Matrix: for x in range(14): for y in range(15): self.matrix[x][y] = Tile(type_='floor', watch_through=1) - self.matrix[1][0].type = 'waiter' + self.matrix[1][0].type = 'table3' self.matrix[1][0].walk_through = 0 def get_type(self, x, y):