The simulation assumes that the only force acting on the ball is the force of gravity so that the ball's acceleration is equal to the so-called "acceleration due to gravity".
Moreover, it is assumed that the range of the ball, both horizontally and vertically, is small enough so that the force of gravity acting on the ball and therefore the ball's acceleration are constant, in magnitude and direction.
However, the magnitude of the acceleration due to gravity can be adjusted, to simulate conditions present at different elevations from the earth's surface or on different planets.