Close to done refactoring now.
This commit is contained in:
@ -25,9 +25,9 @@ void _pokerGameActionBetOnUpdate(
|
||||
// Handle as an AI
|
||||
if(isHuman) {
|
||||
|
||||
if(inputIsPressed(&game->engine->input, INPUT_DOWN)) {
|
||||
} else if(inputIsPressed(&game->engine->input, INPUT_RIGHT)) {
|
||||
} else if(inputIsPressed(&game->engine->input, INPUT_UP)) {
|
||||
if(inputIsPressed(&game->engine.input, INPUT_DOWN)) {
|
||||
} else if(inputIsPressed(&game->engine.input, INPUT_RIGHT)) {
|
||||
} else if(inputIsPressed(&game->engine.input, INPUT_UP)) {
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -84,7 +84,9 @@ void _pokerGameActionBetOnEnd(
|
||||
pokergame_t *game = (pokergame_t *)action->data;
|
||||
|
||||
// Get which player is remaining to move.
|
||||
game->poker.bet.better = pokerBetGetRemainingPlayer(&game->poker);
|
||||
game->poker.bet.better = pokerBetGetRemainingPlayer(
|
||||
&game->poker.bet, game->poker.players, game->poker.roundSmallBlind
|
||||
);
|
||||
|
||||
// Restack
|
||||
pokerGameActionRestackAdd(game);
|
||||
@ -106,7 +108,9 @@ void _pokerGameActionBetOnEnd(
|
||||
discussion.poker = game;
|
||||
pokerDiscussionQueue(&discussion);
|
||||
|
||||
pokerBetResetBetter(&game->poker);
|
||||
pokerBetResetBetter(
|
||||
&game->poker, &game->poker.players, game->poker.roundSmallBlind
|
||||
);
|
||||
pokerGameActionRestackAdd(game);
|
||||
pokerGameActionLookAdd(game, game->poker.bet.better);
|
||||
pokerGameActionBetAdd(game);
|
||||
|
@ -9,9 +9,11 @@
|
||||
#include "../../../libs.h"
|
||||
#include "action.h"
|
||||
#include "restack.h"
|
||||
#include "../../../input/input.h"
|
||||
#include "../../../poker/turn.h"
|
||||
#include "../../../poker/bet.h"
|
||||
#include "../../../poker/actions/flop.h"
|
||||
#include "../pokerdiscussion.h"
|
||||
|
||||
/** Callback when the bet action is updated. */
|
||||
void _pokerGameActionBetOnUpdate(
|
||||
|
@ -41,7 +41,9 @@ 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.
|
||||
pokerBetResetBetter(&game->poker);
|
||||
pokerBetResetBetter(
|
||||
&game->poker, game->poker.players, game->poker.roundSmallBlind
|
||||
);
|
||||
pokerGameActionBetAdd(game);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user