update: horses now probably learn

This commit is contained in:
KOSMOGOR
2025-04-10 23:34:47 +03:00
parent 0128f33f44
commit e6735af700
3 changed files with 29 additions and 19 deletions
+3 -1
View File
@@ -46,7 +46,7 @@ class GameObject:
self.image.set_colorkey(None) # Explicitly disable colorkey
class Horse(GameObject):
default_vacceleration = 0.5 # Default acceleration value
default_vacceleration = 0.3 # Default acceleration value
vspeed = 0 # Vertical speed
vacceleration = 0 # Vertical acceleration
stopped = False # Whether the horse is stopped
@@ -106,6 +106,8 @@ class Horse(GameObject):
def count_fitness(self):
if self.stopped == False:
self.fitness += 1
if self.vacceleration == 0:
self.fitness -= 0.9
class Background(GameObject):
def __init__(self, image_path, x, y):