phc: fix speed

This commit is contained in:
Dmitry Belyaev 2024-04-01 11:09:10 +03:00
parent 71d5115ac1
commit c788c311b1

View File

@ -303,7 +303,7 @@ class Hero(GameObject):
@speed.setter
def speed(self, value):
self._speed = value % 16
self._speed = min(value, 15)
def _reduce_step(self, coords):
"""Уменьшение шага движения, с целью подойти вплотную к стене"""
@ -376,7 +376,7 @@ class Hero(GameObject):
if not self.active:
return
wide, short = 5, 1
wide, short = 3, 1
if event.type == pygame.KEYDOWN:
match event.key:
case pygame.K_UP: