drawcoun screensizead drawrace remainingdistance dra horses shadow swaypatter math. random var play startcountdown changeposition runrace countdown horse_image_ar drawracebackground inithorses horse_Array draw horses line finished drawcountdown coun horseheigh ctx. finalplaces rect canvas cyclesRemaining const true DEFINITION_ORDER