From: brett l. <wak...@gm...> - 2006-02-04 01:12:27
|
To allow the end game conditions to be detected, I'm changing the return types to various cash transferring methods from void to boolean. This seems to be the easiest way of detecting the end of the game. One thing to note: I'm not including logic into CashHolder that will prevent the transaction from completing, I'm simply inserting a check that, if the transaction results in the cash value being reduced to zero or below, we're returning a false value that can be looked for by anyone calling the addCash() methods. It is going to be up to certain CashHolders to detect whether they are allowed to go negative or not. I'm fairly certain, most of those who should be doing this, are already doing it this way. ---Brett. |