I'm trying to grok the Strategy pattern and came up with the following example:
- I'd like to create new games based on chess except with pieces that move differently.
- I also want to use the Strategy pattern to inject behaviors (how they can move) into the pieces.
But if we have Board, Piece, and MoveBehavior objects
- Board->- Piecebecause a- Boardcontains- Pieces
- Piece->- Boardbecause a piece needs to pass in the- Boardas a param to- MoveBehaviorwhich needs the- Boardto decide what moves are acceptable.
 
How can we get rid of this circular dependency? Also, isn't this a common problem in more realistic examples because behaviors need large enough state to make decisions? I think if the behavior is super simple it's not that big a deal to not use the Strategy pattern.
 
     
     
     
    