2019-03-20 20:42:55 +01:00
|
|
|
import pygame
|
|
|
|
|
2019-03-20 23:46:50 +01:00
|
|
|
class GridElement(object):
|
2019-03-26 11:05:21 +01:00
|
|
|
def __init__(self, x, y, game):
|
2019-03-20 20:42:55 +01:00
|
|
|
self.game = game
|
2019-03-20 23:46:50 +01:00
|
|
|
game.idItem += 1
|
|
|
|
self.number = game.idItem
|
2019-03-20 20:42:55 +01:00
|
|
|
self.x = x
|
|
|
|
self.y = y
|
|
|
|
self.image = pygame.image.load("./Images/plytka.png")
|
2019-03-20 23:46:50 +01:00
|
|
|
self.type = "gridElement"
|
2019-03-20 20:42:55 +01:00
|
|
|
|
|
|
|
def draw(self):
|
|
|
|
self.rect = pygame.Rect(self.x, self.y, 50, 50)
|
|
|
|
self.game.screen.blit(self.image, (self.x, self.y))
|