/** * Copyright (c) 2021 Dominic Masters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #include "ai.h" holdemaction_t actionAi() { return (holdemaction_t){ .init = &actionAiInit, .update = &actionAiUpdate, .dispose = &actionAiDispose }; } void actionAiInit(int32_t index, void *data) { logText("AI Round start"); /* Current theory for the AI code will be; 1 - Determine weight of my cards+flop as % 2 - Determine current bet, compare against [something] and then determine if worth the risk. I may need history of the game to make informed decision */ holdemActionRemove(index); } void actionAiUpdate(int32_t index, void *data) { } void actionAiDispose(int32_t index, void *data) { // Do we need to do a flop? if(HOLDEM_GAME_STATE.cardsFacing < HOLDEM_DEALER_HAND) { holdemActionAdd(actionFlop()); } }