inteligenty-traktor/program/tractor.py

16 lines
485 B
Python

import pygame
import os
class Tractor(pygame.sprite.Sprite):
def __init__(self, field):
super().__init__()
self.type = type
self.field = field
self.image = pygame.image.load('images/tractor.png').convert_alpha()
self.image = pygame.transform.scale(self.image, (64, 64))
self.rect = self.image.get_rect()
x, y = 0, 0
self.rect.topleft = (x, y)
def draw(self, surface):
surface.blit(self.image, self.rect)