test nowej galezi

This commit is contained in:
Łukasz 2021-04-11 14:01:24 +02:00
parent 6ec20924d1
commit 7358fcae45
6 changed files with 7 additions and 14 deletions

1
.idea/.gitignore vendored
View File

@ -1,2 +1,3 @@
# Default ignored files # Default ignored files
/shelf/
/workspace.xml /workspace.xml

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (AI_Tractor)" project-jdk-type="Python SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
</project> </project>

View File

@ -2,7 +2,7 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/.idea/AI_PRO2.iml" filepath="$PROJECT_DIR$/.idea/AI_PRO2.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/Sztuczna_Inteligencja_Projekt.iml" filepath="$PROJECT_DIR$/.idea/Sztuczna_Inteligencja_Projekt.iml" />
</modules> </modules>
</component> </component>
</project> </project>

View File

@ -13,15 +13,8 @@ TILE_SIZE = 100
HORIZONTAL_TILES_NUMBER = ceil(DISPLAY_SIZE_HORIZONTAL/TILE_SIZE) HORIZONTAL_TILES_NUMBER = ceil(DISPLAY_SIZE_HORIZONTAL/TILE_SIZE)
VERTICAL_TILES_NUMBER = floor((DISPLAY_SIZE_VERTICAL-200)/TILE_SIZE) VERTICAL_TILES_NUMBER = floor((DISPLAY_SIZE_VERTICAL-200)/TILE_SIZE)
#TILE_SIZE
#colors #colors
WHITE = (255, 255, 255) #SUPER UPRAWA WHITE = (255, 255, 255) #SUPER UPRAWA
BLACK = (0, 0, 0)
RED = (255, 0, 0) #DO ZASIANIA
YELLOW = (255, 255, 0) #DO PODLANIA
GREEN = (0, 255, 0) #DO SCIECIA
#tractor const #tractor const
@ -29,8 +22,8 @@ TRACTOR_WIDTH = TILE_SIZE
TRACTOR_HEIGHT = TILE_SIZE TRACTOR_HEIGHT = TILE_SIZE
#FRAMES PER SECOND #FRAMES PER SECOND
FPS = 10 FPS = 3
#ANIMATION_PART #ANIMATION_PART
ANIMATION_PART = 11 ANIMATION_PART = 1

View File

@ -7,7 +7,6 @@ def cruiseControl(tractor, direction, cruiseControl):
direction = "STOP" direction = "STOP"
return direction return direction
def manualTurning(event, tractor): def manualTurning(event, tractor):
direction = "STOP" direction = "STOP"
if event.type == pygame.KEYDOWN: if event.type == pygame.KEYDOWN:

View File

@ -15,7 +15,7 @@ display = pygame.display.set_mode((DISPLAY_SIZE_HORIZONTAL, DISPLAY_SIZE_VERTICA
pygame.display.set_caption('Tractor') pygame.display.set_caption('Tractor')
working = True working = True
cruiseControl = True cruiseControl = False
autoAction = True autoAction = True
animationSpeed = ANIMATION_PART animationSpeed = ANIMATION_PART
@ -30,7 +30,7 @@ toolCounter = - 1
board = Board.generate() board = Board.generate()
tractor = Tractor(horizontal_index=-0, vertical_index=0, hitch="nothing", header=False, autodrive=True) tractor = Tractor(horizontal_index=-0, vertical_index=0, hitch="nothing", header=False, autodrive=False)
tillageUnit = TillageUnit("Nothing") tillageUnit = TillageUnit("Nothing")
tractor.turnOnEngine() tractor.turnOnEngine()