Scoring and Integration
intermediateYou have a working game: guessing, validation, game-over detection. But there is no score. In this problem you will add scoring and then compose every piece into a single playTurn function that the button handler can call.
- Calculate a score based on the game outcome
- Compose all prior functions into a single
playTurnfunction
All prior functions are provided as correct, read-only implementations. This lets you focus on composition and integration testing without worrying about bugs in earlier code.