shadow swaypatter math. random var play startcountdown changeposition runrace countdown horse_image_ar drawracebackground inithorses horse_Array line finished drawcountdown coun horseheigh ctx. finalplaces canvas rect prerace horses owner inithorse draw draw horses final results cyclesRemaining const true DEFINITION_ORDER