In snooker , where the cue ball is resting in contact with another ball. If this ball is a ball that may legally be hit, then it is allowable to simply hit away from it and it counts as having hit it in the shot . If the ball moves, then a push shot must have occurred, in which case it is a foul .