Bowling game javascript final implementation