Created moveSnake function in Snake() class