Compare commits
1 Commits
master
...
zmiany_w_a
Author | SHA1 | Date | |
---|---|---|---|
7358fcae45 |
1
.idea/.gitignore
vendored
1
.idea/.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>
|
@ -2,7 +2,7 @@
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<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>
|
||||
</component>
|
||||
</project>
|
11
constants.py
11
constants.py
@ -13,15 +13,8 @@ TILE_SIZE = 100
|
||||
HORIZONTAL_TILES_NUMBER = ceil(DISPLAY_SIZE_HORIZONTAL/TILE_SIZE)
|
||||
VERTICAL_TILES_NUMBER = floor((DISPLAY_SIZE_VERTICAL-200)/TILE_SIZE)
|
||||
|
||||
#TILE_SIZE
|
||||
|
||||
#colors
|
||||
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
|
||||
|
||||
@ -29,8 +22,8 @@ TRACTOR_WIDTH = TILE_SIZE
|
||||
TRACTOR_HEIGHT = TILE_SIZE
|
||||
|
||||
#FRAMES PER SECOND
|
||||
FPS = 10
|
||||
FPS = 3
|
||||
|
||||
#ANIMATION_PART
|
||||
|
||||
ANIMATION_PART = 11
|
||||
ANIMATION_PART = 1
|
@ -7,7 +7,6 @@ def cruiseControl(tractor, direction, cruiseControl):
|
||||
direction = "STOP"
|
||||
return direction
|
||||
|
||||
|
||||
def manualTurning(event, tractor):
|
||||
direction = "STOP"
|
||||
if event.type == pygame.KEYDOWN:
|
||||
|
4
main.py
4
main.py
@ -15,7 +15,7 @@ display = pygame.display.set_mode((DISPLAY_SIZE_HORIZONTAL, DISPLAY_SIZE_VERTICA
|
||||
pygame.display.set_caption('Tractor')
|
||||
|
||||
working = True
|
||||
cruiseControl = True
|
||||
cruiseControl = False
|
||||
autoAction = True
|
||||
|
||||
animationSpeed = ANIMATION_PART
|
||||
@ -30,7 +30,7 @@ toolCounter = - 1
|
||||
|
||||
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")
|
||||
|
||||
tractor.turnOnEngine()
|
||||
|
Loading…
Reference in New Issue
Block a user