motion = 'none'
posX = 20
posY = 50
size = 20
moveSpeed = 4
class player:
def __init__(self):
self.posX = posX
self.posY = posY
self.size = size
self.moveSpeed = moveSpeed
def move(self):
if motion == 'up':
if self.posY >= self.size * 2:
self.posY -= self.moveSpeed
elif motion == 'down':
if self.posY <= screenHeight - self.size * 2:
self.posY += self.moveSpeed
self.posY
класса player, как я могу это реализовать? bool(player.posY > 10)
print(player.posY)
str(player.posY)
posY
класса player