preventing moving in the opposite direction
game ends if player collides with self