bowling game function that was made using TDD approach.