Added rewind method.

This commit is contained in:
2021-08-24 10:07:04 -07:00
parent c198cd9908
commit b1b441cef9
7 changed files with 48 additions and 17 deletions

View File

@ -16,7 +16,6 @@ void _pokerGameActionBetOnUpdate(
pokergame_t *game = (pokergame_t *)action->data;
pokerplayer_t *player;
// As of right now the queue should basically be empty besides this item, so
// let's restack
queueRestack(queue);

View File

@ -10,15 +10,16 @@
void _pokerGameActionLookOnStart(
queue_t *queue, queueaction_t *action, uint8_t i
) {
printf("Looking at %u\n", (uint8_t)action->data);
pokerWorldLookAtPlayer(action);
) {
pokergame_t *game = (pokergame_t *)action->data;
pokergameactiondata_t *data = game->actionData + i;
printf("Looking at %u\n", data->lookAtPlayer);
queueNext(queue);
}
queueaction_t * pokerGameActionLookAdd(pokergame_t *game, uint8_t playerIndex) {
queueaction_t *action = pokerGameActionAdd(game);
action->onStart = &_pokerGameActionLookOnStart;
game->actionData[action->index].lookAtPlayer = playerIndex;
return action;
}