-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Common Issues
Ben Forrest edited this page Jul 20, 2015
·
2 revisions
One of the commonest problems in the bowling challenge is not understanding and/or modelling the rules! Check that the code correctly handles spares, strikes and - as an added bonus - the final frame!
It's common to see objects relying on the internals of other objects or their implementation of low-level types (particularly arrays)
Many solutions rely on a 'virtuous consumer' - i.e. they do not validate inputs or check for out of range values etc.
Function names should ideally start with a verb so it's clear that they do something to something else.
For example, a function that calculates the score should be named calculateScore
. A function named score
should probably only return a score that was already calculated.