2019-03-19 11:47:23 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import pygame
|
2019-03-19 10:08:38 +01:00
|
|
|
import sys
|
|
|
|
from pygame.locals import *
|
2019-03-19 17:21:54 +01:00
|
|
|
|
2019-03-20 22:36:40 +01:00
|
|
|
CELL_SIZE = 64
|
|
|
|
|
2019-03-21 01:25:19 +01:00
|
|
|
|
2019-03-19 11:47:23 +01:00
|
|
|
class Cell(pygame.sprite.Sprite):
|
2019-03-21 01:25:19 +01:00
|
|
|
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(
|
2019-03-25 17:41:24 +01:00
|
|
|
self.x*CELL_SIZE, self.y*CELL_SIZE, CELL_SIZE, CELL_SIZE)
|