Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API 1: validate calculateScore input #1

Open
tomfa opened this issue Aug 4, 2022 · 0 comments
Open

API 1: validate calculateScore input #1

tomfa opened this issue Aug 4, 2022 · 0 comments
Labels

Comments

@tomfa
Copy link
Member

tomfa commented Aug 4, 2022

Look at lib/bowling.ts. The calculateScore method currently accepts a list of bowling throws.
We want to validate the input, so one one cheats!

  • Throws can not be larger than 10
  • Throws can not be lower than 0
  • A round is over when 2 throws are made, or if the 1st was a 10
  • We accept 0 or more throws, but not one that results in more than 10 rounds.
  • A round with total score > 10 is not allowed.
@tomfa tomfa added the api label Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant