refactor player and enemy movement cases