SZI2019SmieciarzWmi/sprites/cell.py
2019-03-21 01:25:19 +01:00

19 lines
389 B
Python

# -*- coding: utf-8 -*-
import pygame
import sys
from pygame.locals import *
CELL_SIZE = 64
class Cell(pygame.sprite.Sprite):
def __init__(self, x, y):
pygame.sprite.Sprite.__init__(self)
self.x = x
self.y = y
self.update()
def update(self):
self.rect = pygame.Rect(
self.x*CELL_SIZE, self.y*CELL_SIZE, CELL_SIZE, CELL_SIZE)