def keyPressed():
if key == 'w' or key == 'W':
player.pos.y == constrain(player.pos.y - player.vel,arena.pos.y,arena.pos.y + arena.h)
elif key == 's' or key == 'S':
player.pos.y == constrain(player.pos.y + player.vel,arena.pos.y,arena.pos.y + arena.h)
if key == 'a' or key == 'A':
player.pos.x == constrain(player.pos.x - player.vel,arena.pos.x,arena.pos.x + arena.w)
elif key == 'd' or key == 'D':
player.pos.x == constrain(player.pos.x + player.vel,arena.pos.x,arena.pos.x + arena.w)
My player doesn’t move, thats all.
Ps.
player.vel = 7