apple catching game programming