The Chain of Responsibility – Part 1

The Chain design pattern enables us to connect objects to each other as if they were chains. Before we can implement this design pattern, we will need to update the logic of our core circle to enable it to store the next link in a chain.

  • Link objects to each other in a chain
  • Ensure that there is no central control; each link decides whether to continue
  • Ascertain why this is ideal for complex animations that affect other objects