html game bouncing ball - splitted example