Sztuczna_Inteligencja/gridElement.py

15 lines
450 B
Python
Raw Normal View History

2019-04-10 10:31:09 +02:00
import pygame
# Klasy elementów
class GridElement(object):
def __init__(self, x, y, game):
self.game = game
game.idItem += 1
self.number = game.idItem
self.x = x
self.y = y
self.image = pygame.image.load("./Images/plytka.png")
self.type = "gridElement"
def draw(self):
self.rect = pygame.Rect(self.x, self.y, 50, 50)
self.game.screen.blit(self.image, (self.x, self.y))