inteligenty-traktor/src/field.py

16 lines
361 B
Python

import pygame
from tile import Tile
from tractor import Tractor
class Field:
def __init__(self):
self.tiles = pygame.sprite.Group()
for x in range(256):
self.tiles.add(Tile(x, 'grass', self))
self.tractor = Tractor(self)
def draw(self, surface):
self.tiles.draw(surface)
self.tractor.draw(surface)