vishal2241 / opentestbed

Automatically exported from code.google.com/p/opentestbed
0 stars 0 forks source link

Create an (abstract) class 'Game' and a first implementation for Tourney or CashGame #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The Game class (or its subclasses like Tournament, CashGame and alike) is
responsible to make a Dealer deal cards, change the blinds when needed and
giving players their payouts, when the game has ended.

The Game class will get a GameDescription (which might be splittet into
subclasses as well) to initialize its state and then run the game.

Original issue reported on code.google.com by bluegasp...@gmail.com on 17 Mar 2010 at 10:31

GoogleCodeExporter commented 8 years ago
we're gonna need some object to hold the current state of the game(per each 
action)
which will contain stacks/board/pot[s] etc.
otherwise we'll have to re-play the game to get the context(player raised 
half-pot
into 2 limpers etc.)
this is more related to the later analysis, than the actual tourney/game, but 
still
we should keep that in mind

Original comment by absolut...@gmail.com on 18 Mar 2010 at 8:17

GoogleCodeExporter commented 8 years ago
absolut666, GameInfo (specifically the implementation PublicGameInfo) holds 
table
(and current hand) state. Correct me if I misunderstood oyu.

Original comment by schatzbe...@gmail.com on 18 Mar 2010 at 8:29

GoogleCodeExporter commented 8 years ago
absolut666 - if you write an implementation for the GameObserver interface then 
the
GUI will be notified by all changes. Most methods have a reference to a
GameInfo-Object where you should be able to read all important stuff. 

It will be a bit tricky though to handle thread management. The Observer will be
called in some background thread I guess, so to pass information to the 
GUI-thread
you need to make a copy of the most important stuff so that we don't need
synchronisation in the GameInfo object itself.

Original comment by bluegasp...@gmail.com on 18 Mar 2010 at 10:20

GoogleCodeExporter commented 8 years ago
i'll take care of the UI thread - i already done it with the pokerai's testbed 
and
with PokerAcademy. and besides it's gonna be "me" (GUI) who will actually run 
the 
Dealer/TournamentRunner. anyway, no synchronization needed (i'm afraid of
multithreading bugs more than you :)

Original comment by absolut...@gmail.com on 18 Mar 2010 at 11:20

GoogleCodeExporter commented 8 years ago
finished a runner for cashgames.
Usage can be seen in the CashGameConsoleStarter

Original comment by bluegasp...@gmail.com on 29 Mar 2010 at 12:05