}
@Override
public void gameBettingRoundStarted()
{
final TableInfo table = m_game.getTable();
final List<PlayerInfo> lst = table.getPlayingPlayers();
for (int i = 0; i < table.getPlayingPlayers().size(); ++i)
{
huds[lst.get(i).getNoSeat()].setAlive();
}
int i = 0;
for (; i < 5 && m_game.getTable().getCards().get(i).getId() != Card.NO_CARD_ID; ++i)
{
board[i].setCard(m_game.getTable().getCards().get(i));
}
for (; i < 5; ++i)
{
board[i].setCard(Card.HIDDEN_CARD);
}
}
@Override
public void gameBlindsNeeded()
{
changePotAmount(0);
final TableInfo table = m_game.getTable();
huds[table.getNoSeatDealer()].setDealer();
huds[table.getNoSeatSmallBlind()].setSmallBlind();
huds[table.getNoSeatBigBlind()].setBigBlind();
for (int i = 0; i < 5; ++i)
{
board[i].setCard(Card.HIDDEN_CARD);
}
}
@Override
public void gameEnded()
{
final TableInfo table = m_game.getTable();
for (int i = 0; i < table.getPlayers().size(); ++i)
{
if (table.getPlayer(i) != null)
{
final JPanelPlayerHud php = huds[i];
final JLabel bet = bets[i];
bet.setText("");
php.setPlayerMoney(table.getPlayer(i).getMoneySafeAmnt());
php.setNotDealer();
php.setNoBlind();
php.isDoingNothing();
if (table.getPlayer(i).getMoneySafeAmnt() == 0)
{
php.setDead();
php.setPlayerCards(Card.NO_CARD, Card.NO_CARD);
}
php.setPlayerAction(PlayerActionType.NOTHING);
}
}
super.gameEnded();
}
@Override
public void gameGenerallyUpdated()
{
final TableInfo table = m_game.getTable();
for (final PlayerInfo p : table.getPlayers())
{
final JPanelPlayerHud php = huds[p.getNoSeat()];
installPlayer(php, p);
}
}
@Override
public void playerActionNeeded(PlayerInfo p, PlayerInfo last)
{
final JPanelPlayerHud php = huds[p.getNoSeat()];
php.setPlayerAction(PlayerActionType.NOTHING, 0);
php.isPlaying();
}
@Override
public void playerActionTaken(PlayerInfo p, PlayerActionType reason, int playedAmount)
{
final TableInfo table = m_game.getTable();
final JPanelPlayerHud php = huds[p.getNoSeat()];
php.setPlayerMoney(p.getMoneySafeAmnt());
php.isDoingNothing();
php.setPlayerAction(reason, playedAmount);
changePotAmount(table.getTotalPotAmnt());
if (reason == PlayerActionType.FOLDED)
{
php.setPlayerCards(Card.NO_CARD, Card.NO_CARD);
}