3 Matching Annotations
  1. May 2020
    1. Classes and responsibilities:

      Game logic (1)

      • Keep track of the players' turns
      • Determine a winner
      • Execute a turn and the correct number of turns

      Player (2)

      • take a turn
      • make a decision on what category to score a roll

      Scorecard (1 per player)

      • keep track of open and scored categories
      • determine how many points to award for a given roll

      Dice (5 per player)

      • Roll itself
      • Report what number was rolled
    2. Single responsibility principle: "classes should have a single reason to change"

      (analogous to the "single layer of abstraction" within a function or method)