Scoring and Integration

intermediate

You 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.

  1. Calculate a score based on the game outcome
  2. Compose all prior functions into a single playTurn function

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.

Steps