Step 2: Define class Domino


  • State
    • position, extent, color, angle, tail, head
  • Behavior
    • frontsAfterTopplingBy: <angleInRadians>
      "Answer the collection of dominos on front after toppling the receiver by angleInRadians"

    • hitAngleAgainstHead
      "Compute the angle at which the receiver will hit the nearest successing domino"

    • propagateChangeToTail
      "The receiver has changed its topply angle, dispatch recomputation to all predecessors