question: private void freeKick ( Team offense ) { if ( gameTime <= 0 ) return ; else { if ( gameTime < 180 && ( ( gamePoss && ( awayScore - homeScore ) <= 8 && ( awayScore - homeScore ) > 0 ) || ( ! gamePoss && ( homeScore - awayScore ) <= 8 && ( homeScore - awayScore ) > 0 ) ) ) { if ( offense . getK ( 0 ) . ratKickFum * Math . random ( ) > 60 || Math . random ( ) < 0.1 ) { gameEventLog += getEventPrefix ( ) + offense . abbr + " K " + offense . getK ( 0 ) . name + " successfully executes onside kick! " + offense . abbr + " has possession!" ; gameYardLine = 35 ; gameDown = 1 ; gameYardsNeed = 10 ; } else { gameEventLog += getEventPrefix ( ) + offense . abbr + " K " + offense . getK ( 0 ) . name + " failed the onside kick and lost possession." ; gamePoss = ! gamePoss ; gameYardLine = 65 ; gameDown = 1 ; gameYardsNeed = 10 ; } gameTime -= 4 + 4 * Math . random ( ) ; } else { gameYardLine = ( int ) ( 115 - ( offense . getK ( 0 ) . ratKickPow + 20 - 40 * Math . random ( ) ) ) ; if ( gameYardLine <= 0 ) gameYardLine = 25 ; gameDown = 1 ; gameYardsNeed = 10 ; gamePoss = ! gamePoss ; gameTime -= 15 * Math . random ( ) ; } } }
target:  Kick the ball off following a safety, turning the ball over to the other team. Safety free kicks happen from the 20 instead of the 35, so start the kicker from further back.