title: Assigning responsibility: a Game that has Players which each has a BankAccount
body: <p>I've been studying some Object Oriented Analysis and Design lately, and I feel that I got a pretty good overall feel for it.</p>
  
  <p>But this little scenario keeps bugging me.</p>
  
  <p>Let's say I'm designing a simple board game. I have class Game which holds info about the board and the players. Players are created from the class Player. All players have a bank account created from the class BankAccount.</p>
  
  <p>My Game handles the logic about what should happen following a move. Most of the time this involves withdrawing or depositing some amount from a players bank account.</p>
  
  <p>My BankAccount has the methods for withdrawing, depositing and returning the balance. But my Game doesn't know about a players bank account. Only about the player. Do I give my Player class a method getAccount, so i can call <code>playerObject.getAccount().withdraw()</code>? Or how do I go about assigning the responsibility for this behaviour? Should my Player class implement a method <code>withdraw()</code> that just calls <code>account.withdraw()</code> on it's associated account object? </p>