inteligenty-traktor/src/field.py

18 lines
419 B
Python

import pygame
from tile import Tile
from tractor import Tractor
class Field:
def __init__(self):
self.tiles = pygame.sprite.Group()
# TODO: enable resizing field grid from 16x16 to any size
for x in range(256):
self.tiles.add(Tile(x, self))
self.tractor = Tractor(self)
def draw(self, surface):
self.tiles.draw(surface)
self.tractor.draw(surface)