Merge remote-tracking branch 'origin/master'
# Conflicts: # drawUI.py
This commit is contained in:
commit
f7b29335f5
@ -1,5 +1,13 @@
|
||||
class Field:
|
||||
def __init__(self, horizontal, vertical, state):
|
||||
self.horizontal = horizontal
|
||||
self.vertical = vertical
|
||||
self.state = state
|
||||
def __init__(self, __horizontal, __vertical, __state):
|
||||
self.horizontal = __horizontal
|
||||
self.vertical = __vertical
|
||||
self.__state = __state
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
return self.__state
|
||||
|
||||
@state.setter
|
||||
def state(self, state):
|
||||
self.__state = state
|
||||
|
@ -1,4 +1,47 @@
|
||||
class Tractor:
|
||||
def __init__(self, horizontal_index, vertical_index):
|
||||
def __init__(self, horizontal_index, vertical_index, hitch, header, fuel_tank):
|
||||
self.horizontal_index = horizontal_index
|
||||
self.vertical_index = vertical_index
|
||||
self.hitch = hitch
|
||||
self.header = header
|
||||
self.fuel_tank = fuel_tank
|
||||
|
||||
@property
|
||||
def horizontal_index(self):
|
||||
return self.__horizontal_index
|
||||
|
||||
@horizontal_index.setter
|
||||
def horizontal_index(self, horizontal_index):
|
||||
self.__horizontal_index = horizontal_index
|
||||
|
||||
@property
|
||||
def vertical_index(self):
|
||||
return self.__vertical_index
|
||||
|
||||
@vertical_index.setter
|
||||
def vertical_index(self, vertical_index):
|
||||
self.__vertical_index = vertical_index
|
||||
|
||||
@property
|
||||
def hitch(self):
|
||||
return self.__hitch
|
||||
|
||||
@hitch.setter
|
||||
def hitch(self, hitch):
|
||||
self.__hitch = hitch
|
||||
|
||||
@property
|
||||
def fuel_tank(self):
|
||||
return self.__fuel_tank
|
||||
|
||||
@fuel_tank.setter
|
||||
def fuel_tank(self, fuel_tank):
|
||||
self.__fuel_tank = fuel_tank
|
||||
|
||||
@property
|
||||
def header(self):
|
||||
return self.__header
|
||||
|
||||
@header.setter
|
||||
def header(self, header):
|
||||
self.__header = header
|
@ -5,7 +5,7 @@ DISPLAY_SIZE_HORIZONTAL = 600
|
||||
DISPLAY_SIZE_VERTICAL = 600
|
||||
|
||||
#TILE DIVIDER = TILE SIZE
|
||||
TILE_SIZE = 50
|
||||
TILE_SIZE = 30
|
||||
|
||||
# number of tiles
|
||||
HORIZONTAL_TILES_NUMBER = DISPLAY_SIZE_HORIZONTAL/TILE_SIZE
|
||||
@ -22,8 +22,6 @@ GREEN = (0, 255, 0) #DO SCIECIA
|
||||
|
||||
|
||||
#tractor const
|
||||
TRACTOR_HORIZONTAL_LOCATION = DISPLAY_SIZE_HORIZONTAL/2
|
||||
TRACTOR_VERTICAL_LOCATION = DISPLAY_SIZE_VERTICAL/2
|
||||
|
||||
TRACTOR_WIDTH = TILE_SIZE
|
||||
TRACTOR_HEIGHT = TILE_SIZE
|
||||
|
@ -18,7 +18,7 @@ vertical_change = 0
|
||||
|
||||
board = Board.generate()
|
||||
|
||||
tractor = Tractor(horizontal_index=0, vertical_index=0)
|
||||
tractor = Tractor(horizontal_index=0, vertical_index=0, hitch="nothing", header=False, fuel_tank=100)
|
||||
|
||||
clock = pygame.time.Clock()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user