Pony7 / cspoker

Automatically exported from code.google.com/p/cspoker
GNU General Public License v2.0
1 stars 0 forks source link

StackChangedEvent should not be used? #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The only point of having a StackChangedEvent is to update the Player chip
count at the client side without keeping track of the pot. The problem this
poses is that you'll typically see a RaiseEvent followed by a
StackChangedEvent. However you would want to update the Player chip count
before throwing the RaiseEvent because the user can do
getPlayer().getStackValue() and then the stack value will be incorrect.

There are 2 options:
 *  we clearly specify that the SavedPlayer object returned by the event
represents the player right before the event takes place.
 *  we get rid of StackChangedEvent

Original issue reported on code.google.com by guy...@gmail.com on 30 Sep 2007 at 11:17

GoogleCodeExporter commented 9 years ago

Original comment by guy...@gmail.com on 30 Sep 2007 at 11:17

GoogleCodeExporter commented 9 years ago

Original comment by guy...@gmail.com on 8 Mar 2008 at 8:56