Cleaning more code.
This commit is contained in:
@ -35,6 +35,8 @@ void _pokerGameActionBetOnUpdate(
|
||||
if(isHuman) {
|
||||
// turn = game->ui.betTurn;
|
||||
// turnMade = game->ui.betTurnMade;
|
||||
turn = pokerTurnGetForPlayer(&game->poker, game->poker.better);
|
||||
turnMade = true;
|
||||
} else {
|
||||
turn = pokerTurnGetForPlayer(&game->poker, game->poker.better);
|
||||
turnMade = true;
|
||||
|
@ -18,7 +18,8 @@ void _pokerGameActionRoundOnEnd(queue_t *queue,queueaction_t *action,uint8_t i){
|
||||
pokergame_t *game = (pokergame_t *)action->data;
|
||||
|
||||
// Start the round
|
||||
pokerActionRoundAdd(queue, &game->poker);
|
||||
pokerResetRound(&game->poker);
|
||||
pokerNewDealer(&game->poker);
|
||||
|
||||
// Speak
|
||||
data.poker = game;
|
||||
@ -42,7 +43,6 @@ void _pokerGameActionRoundOnEnd(queue_t *queue,queueaction_t *action,uint8_t i){
|
||||
// Begin Betting Round. This will queue for one player only and then the round
|
||||
// will take over.
|
||||
|
||||
// TODO: finish
|
||||
pokerResetBettingRound(&game->poker);
|
||||
pokerGameActionBetAdd(game);
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "../../../libs.h"
|
||||
#include "../../../poker/actions/blinds.h"
|
||||
#include "action.h"
|
||||
#include "../pokerdiscussion.h"
|
||||
#include "bet.h"
|
||||
|
@ -15,8 +15,22 @@ void _pokerGameActionStartOnStart(
|
||||
|
||||
void _pokerGameActionStartOnEnd(queue_t *queue,queueaction_t *action,uint8_t i){
|
||||
pokerdiscussiondata_t data;
|
||||
uint8_t j, k;
|
||||
pokergame_t *game = (pokergame_t *)action->data;
|
||||
|
||||
//TODO: Init Players betterer.
|
||||
pokerInit(&game->poker);
|
||||
pokerSetBlinds(
|
||||
&game->poker, POKER_BET_BLIND_SMALL_DEFAULT, POKER_BET_BLIND_BIG_DEFAULT
|
||||
);
|
||||
for(j = 0; j < POKER_PLAYER_COUNT_MAX; j++) {
|
||||
k = pokerPlayerAdd(&game->poker);
|
||||
pokerPlayerChipsAdd(
|
||||
game->poker.players + k,
|
||||
POKER_BET_PLAYER_CHIPS_DEFAULT
|
||||
);
|
||||
}
|
||||
|
||||
// Say that.
|
||||
data.poker = game;
|
||||
data.reason = POKER_DISCUSSION_REASON_MATCH_START;
|
||||
|
Reference in New Issue
Block a user