Class Table added

This commit is contained in:
s444427 2020-04-03 16:32:24 +02:00
parent a206b3709c
commit 8b1ce73354

24
main.py
View File

@ -29,9 +29,19 @@ class Waiter(pygame.sprite.Sprite):
# TILE
class Tile:
def __init__(self):
self.x_position = 0
self.y_position = 0
def __init__(self, x_position, y_position):
self.x_position = x_position
self.y_position = y_position
self.watch_through = 1
self.walk_through = 1
self.action_required = 0
# TABLE
class Table(Tile):
def __init__(self, x_position, y_position):
super().__init__(x_position, y_position)
self.walk_through = 0
# SETUP
@ -62,9 +72,7 @@ def matrix_creator():
for x in range(14):
for y in range(15):
matrix[x][y] = Tile()
matrix[x][y].x_position = x
matrix[x][y].y_position = y
matrix[x][y] = Tile(x, y)
waiterPly = Waiter()
@ -94,3 +102,7 @@ if __name__ == "__main__":
waiterPly.update()
pygame.display.flip()
clock.tick(fps)
# # Testy funkcjonalne
# matrix[0][0] = Table(0, 0)
# print(matrix[0][0].walk_through, matrix[1][0].walk_through)