Deamon
Server API trough REST or SOAP
API
Server management
ping()
Player management
createPlayer()
Game management
createTable()getTables()
Play management
joinTable()leaveTable()getPlayers()- get player info
Play
May be used before your turn but "max time" after your turn. Missing your turn will result in automatic drop()
deal()- who decides this?getCards()- your hand and cards on tablegetState()- whos turn, current stakes, who is all inraise()call()fold()
Data model
Game
namemin_stakeplayer_delay- max time to perform play actionstate- game statecards- current cards on the table
Player
namepasswordaccount- total cash owned by playerstate- wait/play/foldbet- total betaction- last play actionhand- cards in handis_all_in- if player is all in
State machine
createPlayer()(multiple)createTable()joinTable()(each player)deal()(any player)- Repeat during game until 'win' condition.
getState()(all players)getCards()(all players)raise(),call(),fold()
- Define winner (evaluate hands)
- Transfer money
- repeat to
deal()...