diff --git a/src/game/poker/actions/bet.c b/src/game/poker/actions/bet.c index 19c7210d..313280a6 100644 --- a/src/game/poker/actions/bet.c +++ b/src/game/poker/actions/bet.c @@ -93,7 +93,9 @@ void _pokerGameActionBetOnEnd( // Are we waiting on any players? if(playersPending) return; + // Not waiting, restack and do next action. printf("Not waiting on anything!\n"); + pokerGameActionRestackAdd(game); // No! Begin the next flop. next = pokerActionNextFlopAdd(queue, &game->poker); @@ -102,9 +104,9 @@ void _pokerGameActionBetOnEnd( pokerGameActionBetAdd(game); return; } - - printf("All betting is done, reveal"); + /** Queue a restack */ + printf("All betting is done, reveal\n"); } queueaction_t * pokerGameActionBetAdd(pokergame_t *game) { diff --git a/src/game/poker/actions/bet.h b/src/game/poker/actions/bet.h index 17620e29..ea2b9ee2 100644 --- a/src/game/poker/actions/bet.h +++ b/src/game/poker/actions/bet.h @@ -8,6 +8,7 @@ #pragma once #include #include "action.h" +#include "restack.h" #include "../../../poker/turn.h" #include "../../../poker/bet.h" #include "../../../poker/actions/flop.h" diff --git a/src/game/poker/actions/restack.c b/src/game/poker/actions/restack.c index 47c19ca2..f1052c0b 100644 --- a/src/game/poker/actions/restack.c +++ b/src/game/poker/actions/restack.c @@ -10,6 +10,8 @@ void _pokerGameActionRestackOnStart( queue_t *queue, queueaction_t *action, uint8_t i ) { + pokergame_t *game = (pokergame_t *)action->data; + printf("Restacking\n"); pokerGameQueueRestack(game); queueNext(queue); } diff --git a/src/game/poker/discussion/pokerdiscussion.c b/src/game/poker/discussion/pokerdiscussion.c index 6fee1c82..af587581 100644 --- a/src/game/poker/discussion/pokerdiscussion.c +++ b/src/game/poker/discussion/pokerdiscussion.c @@ -15,17 +15,6 @@ void pokerDiscussionGet( sizeof(uint8_t) * POKER_DISCUSSION_MESSAGE_COUNT_MAX ); - for(uint8_t i = 0; i < POKER_PLAYER_COUNT; i++) { - char *buffer = malloc(sizeof(char) * 50); - sprintf(buffer, "Player %u", i); - discussion->messages[discussion->count] = buffer; - discussion->emotions[discussion->count] = i * 16; - discussion->players[discussion->count] = i; - discussion->count++; - } - - return; - switch(data->reason) { // Match Start Conversations case POKER_DISCUSSION_REASON_MATCH_START: