choose apple position func and ticks till next apple func