forked from s452751/AI_PRO
v 1.23
This commit is contained in:
parent
f1b61a0889
commit
5c8d3aabbd
@ -1,3 +1,4 @@
|
||||
from Main.TractorLoad import TillageUnit
|
||||
from Main.constants import *
|
||||
from Main.images import *
|
||||
import pygame
|
||||
@ -14,7 +15,11 @@ def drawUI(board, display, tractor, direction, tillageUnit, field):
|
||||
|
||||
def drawInfo(display, tractor, tillageUnit, field):
|
||||
myfont = pygame.font.SysFont('Comic Sans MS', 30)
|
||||
text = f"Fuel: {tractor.fuel_tank} \t Hitches: {tractor.hitch} \t Header: {tractor.header} \t Engine working: {tractor.engineWorking}"
|
||||
hitches = tractor.hitch
|
||||
if isinstance(tractor.hitch, TillageUnit):
|
||||
hitches = "Tillage Unit"
|
||||
|
||||
text = f"Fuel: {tractor.fuel_tank} \t Hitches: {hitches} \t Header: {tractor.header} \t Engine working: {tractor.engineWorking}"
|
||||
textsurface = myfont.render(text, False, (0, 0, 0))
|
||||
display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 200)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user