Sztuczna_Inteligencja/table.py

24 lines
714 B
Python
Raw Normal View History

2019-04-10 10:31:09 +02:00
import pygame
class Table(object):
def __init__(self, x, y, game, height=2, width=4):
self.x = x
self.y = y
self.height = height
self.width = width
self.game = game
game.idTable += 1
game.idItem += 1
self.number = game.idItem
self.isBusy = False
self.id = game.idTable
2019-04-14 18:33:30 +02:00
self.image = pygame.image.load("./Images/table.png")
self.image = pygame.transform.scale(self.image, (50, 50))
2019-04-10 10:31:09 +02:00
self.type = "table"
def draw(self):
self.table = pygame.Rect(self.x, self.y, 50, 50)
2019-04-14 18:33:30 +02:00
pygame.draw.rect(self.game.screen, (0, 0, 0), self.table)
2019-04-10 10:31:09 +02:00
self.game.screen.blit(self.image, (self.x, self.y))