From e77893f01c7d436363f3c8694bea5fa279c4db9f Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Sun, 16 May 2021 17:51:00 -0700 Subject: [PATCH] Moved texas holdem files out of holdem directory. --- src/card/{poker => }/action/action.c | 0 src/card/{poker => }/action/action.h | 0 src/card/{poker => }/action/ai.c | 8 ++++++++ src/card/{poker => }/action/ai.h | 2 +- src/card/{poker => }/action/deal.c | 0 src/card/{poker => }/action/deal.h | 2 +- src/card/{poker => }/action/flop.c | 0 src/card/{poker => }/action/flop.h | 2 +- src/card/{poker => }/action/round.c | 0 src/card/{poker => }/action/round.h | 2 +- src/card/{poker => }/action/shuffle.c | 0 src/card/{poker => }/action/shuffle.h | 2 +- src/card/{poker => }/action/start.c | 0 src/card/{poker => }/action/start.h | 2 +- src/card/{poker => }/holdem.c | 0 src/card/{poker => }/holdem.h | 12 ++++++------ src/card/{poker => }/holdemgame.c | 0 src/card/{poker => }/holdemgame.h | 6 +++--- src/card/{poker => }/model/pokertable.c | 0 src/card/{poker => }/model/pokertable.h | 2 +- src/card/{poker => }/render/card.c | 0 src/card/{poker => }/render/card.h | 10 +++++----- src/card/{poker => }/render/frame.c | 0 src/card/{poker => }/render/frame.h | 10 +++++----- src/card/{poker => }/render/holdemrender.c | 0 src/card/{poker => }/render/holdemrender.h | 18 +++++++++--------- src/card/{poker => }/render/look.c | 0 src/card/{poker => }/render/look.h | 2 +- src/card/{poker => }/render/player.c | 0 src/card/{poker => }/render/player.h | 6 +++--- src/card/{poker => }/render/scene.c | 0 src/card/{poker => }/render/scene.h | 6 +++--- src/game/game.h | 2 +- 33 files changed, 51 insertions(+), 43 deletions(-) rename src/card/{poker => }/action/action.c (100%) rename src/card/{poker => }/action/action.h (100%) rename src/card/{poker => }/action/ai.c (71%) rename src/card/{poker => }/action/ai.h (92%) rename src/card/{poker => }/action/deal.c (100%) rename src/card/{poker => }/action/deal.h (92%) rename src/card/{poker => }/action/flop.c (100%) rename src/card/{poker => }/action/flop.h (93%) rename src/card/{poker => }/action/round.c (100%) rename src/card/{poker => }/action/round.h (94%) rename src/card/{poker => }/action/shuffle.c (100%) rename src/card/{poker => }/action/shuffle.h (93%) rename src/card/{poker => }/action/start.c (100%) rename src/card/{poker => }/action/start.h (92%) rename src/card/{poker => }/holdem.c (100%) rename src/card/{poker => }/holdem.h (84%) rename src/card/{poker => }/holdemgame.c (100%) rename src/card/{poker => }/holdemgame.h (84%) rename src/card/{poker => }/model/pokertable.c (100%) rename src/card/{poker => }/model/pokertable.h (92%) rename src/card/{poker => }/render/card.c (100%) rename src/card/{poker => }/render/card.h (86%) rename src/card/{poker => }/render/frame.c (100%) rename src/card/{poker => }/render/frame.h (78%) rename src/card/{poker => }/render/holdemrender.c (100%) rename src/card/{poker => }/render/holdemrender.h (56%) rename src/card/{poker => }/render/look.c (100%) rename src/card/{poker => }/render/look.h (93%) rename src/card/{poker => }/render/player.c (100%) rename src/card/{poker => }/render/player.h (82%) rename src/card/{poker => }/render/scene.c (100%) rename src/card/{poker => }/render/scene.h (78%) diff --git a/src/card/poker/action/action.c b/src/card/action/action.c similarity index 100% rename from src/card/poker/action/action.c rename to src/card/action/action.c diff --git a/src/card/poker/action/action.h b/src/card/action/action.h similarity index 100% rename from src/card/poker/action/action.h rename to src/card/action/action.h diff --git a/src/card/poker/action/ai.c b/src/card/action/ai.c similarity index 71% rename from src/card/poker/action/ai.c rename to src/card/action/ai.c index ff485281..173fa72b 100644 --- a/src/card/poker/action/ai.c +++ b/src/card/action/ai.c @@ -17,6 +17,14 @@ holdemaction_t actionAi() { 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); } diff --git a/src/card/poker/action/ai.h b/src/card/action/ai.h similarity index 92% rename from src/card/poker/action/ai.h rename to src/card/action/ai.h index 8015911c..65785050 100644 --- a/src/card/poker/action/ai.h +++ b/src/card/action/ai.h @@ -9,7 +9,7 @@ #include #include "action.h" #include "flop.h" -#include "../../../debug/log.h" +#include "../../debug/log.h" holdemaction_t actionAi(); diff --git a/src/card/poker/action/deal.c b/src/card/action/deal.c similarity index 100% rename from src/card/poker/action/deal.c rename to src/card/action/deal.c diff --git a/src/card/poker/action/deal.h b/src/card/action/deal.h similarity index 92% rename from src/card/poker/action/deal.h rename to src/card/action/deal.h index 4b29ae31..c25a7032 100644 --- a/src/card/poker/action/deal.h +++ b/src/card/action/deal.h @@ -7,7 +7,7 @@ #pragma once #include -#include "../../../debug/log.h" +#include "../../debug/log.h" #include "action.h" #include "ai.h" diff --git a/src/card/poker/action/flop.c b/src/card/action/flop.c similarity index 100% rename from src/card/poker/action/flop.c rename to src/card/action/flop.c diff --git a/src/card/poker/action/flop.h b/src/card/action/flop.h similarity index 93% rename from src/card/poker/action/flop.h rename to src/card/action/flop.h index ceb0a7c3..a3739246 100644 --- a/src/card/poker/action/flop.h +++ b/src/card/action/flop.h @@ -10,7 +10,7 @@ #include "action.h" #include "../holdem.h" #include "../render/look.h" -#include "../../../debug/log.h" +#include "../../debug/log.h" #include "ai.h" holdemaction_t actionFlop(); diff --git a/src/card/poker/action/round.c b/src/card/action/round.c similarity index 100% rename from src/card/poker/action/round.c rename to src/card/action/round.c diff --git a/src/card/poker/action/round.h b/src/card/action/round.h similarity index 94% rename from src/card/poker/action/round.h rename to src/card/action/round.h index 48abcade..57f4fd2e 100644 --- a/src/card/poker/action/round.h +++ b/src/card/action/round.h @@ -8,7 +8,7 @@ #pragma once #include #include "../render/holdemrender.h" -#include "../../../debug/log.h" +#include "../../debug/log.h" #include "../holdem.h" #include "action.h" #include "ai.h" diff --git a/src/card/poker/action/shuffle.c b/src/card/action/shuffle.c similarity index 100% rename from src/card/poker/action/shuffle.c rename to src/card/action/shuffle.c diff --git a/src/card/poker/action/shuffle.h b/src/card/action/shuffle.h similarity index 93% rename from src/card/poker/action/shuffle.h rename to src/card/action/shuffle.h index 7db8e888..387f24be 100644 --- a/src/card/poker/action/shuffle.h +++ b/src/card/action/shuffle.h @@ -8,7 +8,7 @@ #pragma once #include #include "action.h" -#include "../../../debug/log.h" +#include "../../debug/log.h" typedef struct { void (*done)(); diff --git a/src/card/poker/action/start.c b/src/card/action/start.c similarity index 100% rename from src/card/poker/action/start.c rename to src/card/action/start.c diff --git a/src/card/poker/action/start.h b/src/card/action/start.h similarity index 92% rename from src/card/poker/action/start.h rename to src/card/action/start.h index 330d12d6..6c877a88 100644 --- a/src/card/poker/action/start.h +++ b/src/card/action/start.h @@ -9,7 +9,7 @@ #include #include "action.h" #include "round.h" -#include "../../../debug/log.h" +#include "../../debug/log.h" holdemaction_t actionStart(); diff --git a/src/card/poker/holdem.c b/src/card/holdem.c similarity index 100% rename from src/card/poker/holdem.c rename to src/card/holdem.c diff --git a/src/card/poker/holdem.h b/src/card/holdem.h similarity index 84% rename from src/card/poker/holdem.h rename to src/card/holdem.h index 42d6f1bb..272b4ebb 100644 --- a/src/card/poker/holdem.h +++ b/src/card/holdem.h @@ -7,12 +7,12 @@ #pragma once #include -#include "../card.h" -#include "../../display/spritebatch.h" -#include "../../display/texture.h" -#include "../../display/tileset.h" -#include "../../display/shader.h" -#include "../../file/asset.h" +#include "card.h" +#include "../display/spritebatch.h" +#include "../display/texture.h" +#include "../display/tileset.h" +#include "../display/shader.h" +#include "../file/asset.h" /** * Deals a card to the given player, does all the follow up. diff --git a/src/card/poker/holdemgame.c b/src/card/holdemgame.c similarity index 100% rename from src/card/poker/holdemgame.c rename to src/card/holdemgame.c diff --git a/src/card/poker/holdemgame.h b/src/card/holdemgame.h similarity index 84% rename from src/card/poker/holdemgame.h rename to src/card/holdemgame.h index e3bb453a..170c9bcf 100644 --- a/src/card/poker/holdemgame.h +++ b/src/card/holdemgame.h @@ -9,9 +9,9 @@ #include #include "holdem.h" #include "render/holdemrender.h" -#include "../card.h" -#include "../../file/asset.h" -#include "../../display/gui/font.h" +#include "card.h" +#include "../file/asset.h" +#include "../display/gui/font.h" #include "action/action.h" #include "action/start.h" diff --git a/src/card/poker/model/pokertable.c b/src/card/model/pokertable.c similarity index 100% rename from src/card/poker/model/pokertable.c rename to src/card/model/pokertable.c diff --git a/src/card/poker/model/pokertable.h b/src/card/model/pokertable.h similarity index 92% rename from src/card/poker/model/pokertable.h rename to src/card/model/pokertable.h index 433018a1..baa0464a 100644 --- a/src/card/poker/model/pokertable.h +++ b/src/card/model/pokertable.h @@ -7,7 +7,7 @@ #pragma once #include -#include "../../../display/primitive.h" +#include "../../display/primitive.h" #define POKER_TABLE_NAME "Poker Table" #define POKER_TABLE_VERTICE_COUNT 252 diff --git a/src/card/poker/render/card.c b/src/card/render/card.c similarity index 100% rename from src/card/poker/render/card.c rename to src/card/render/card.c diff --git a/src/card/poker/render/card.h b/src/card/render/card.h similarity index 86% rename from src/card/poker/render/card.h rename to src/card/render/card.h index 075f39c1..cb684b3a 100644 --- a/src/card/poker/render/card.h +++ b/src/card/render/card.h @@ -7,11 +7,11 @@ #pragma once #include -#include "../../../file/asset.h" -#include "../../../display/shader.h" -#include "../../../display/primitive.h" -#include "../../../display/primitives/quad.h" -#include "../../../display/tileset.h" +#include "../../file/asset.h" +#include "../../display/shader.h" +#include "../../display/primitive.h" +#include "../../display/primitives/quad.h" +#include "../../display/tileset.h" /** * Initializes the Card Renderer. diff --git a/src/card/poker/render/frame.c b/src/card/render/frame.c similarity index 100% rename from src/card/poker/render/frame.c rename to src/card/render/frame.c diff --git a/src/card/poker/render/frame.h b/src/card/render/frame.h similarity index 78% rename from src/card/poker/render/frame.h rename to src/card/render/frame.h index 51dff444..1ef15556 100644 --- a/src/card/poker/render/frame.h +++ b/src/card/render/frame.h @@ -7,11 +7,11 @@ #pragma once #include -#include "../../../display/shader.h" -#include "../../../display/primitive.h" -#include "../../../display/primitives/quad.h" -#include "../../../display/framebuffer.h" -#include "../../../display/camera.h" +#include "../../display/shader.h" +#include "../../display/primitive.h" +#include "../../display/primitives/quad.h" +#include "../../display/framebuffer.h" +#include "../../display/camera.h" /** * Initializes the frame buffers to be rendered to later. diff --git a/src/card/poker/render/holdemrender.c b/src/card/render/holdemrender.c similarity index 100% rename from src/card/poker/render/holdemrender.c rename to src/card/render/holdemrender.c diff --git a/src/card/poker/render/holdemrender.h b/src/card/render/holdemrender.h similarity index 56% rename from src/card/poker/render/holdemrender.h rename to src/card/render/holdemrender.h index d5711608..289b9def 100644 --- a/src/card/poker/render/holdemrender.h +++ b/src/card/render/holdemrender.h @@ -7,15 +7,15 @@ #pragma once #include -#include "../../../display/shader.h" -#include "../../../display/primitive.h" -#include "../../../display/primitives/quad.h" -#include "../../../display/spritebatch.h" -#include "../../../display/gui/font.h" -#include "../../../display/framebuffer.h" -#include "../../../display/camera.h" -#include "../../../display/primitives/cube.h" -#include "../../../display/tileset.h" +#include "../../display/shader.h" +#include "../../display/primitive.h" +#include "../../display/primitives/quad.h" +#include "../../display/spritebatch.h" +#include "../../display/gui/font.h" +#include "../../display/framebuffer.h" +#include "../../display/camera.h" +#include "../../display/primitives/cube.h" +#include "../../display/tileset.h" #include "../model/pokertable.h" #include "player.h" diff --git a/src/card/poker/render/look.c b/src/card/render/look.c similarity index 100% rename from src/card/poker/render/look.c rename to src/card/render/look.c diff --git a/src/card/poker/render/look.h b/src/card/render/look.h similarity index 93% rename from src/card/poker/render/look.h rename to src/card/render/look.h index 7ed4dee4..6b388a5d 100644 --- a/src/card/poker/render/look.h +++ b/src/card/render/look.h @@ -6,7 +6,7 @@ */ #include -#include "../../../display/camera.h" +#include "../../display/camera.h" /** * Look at a specific seat diff --git a/src/card/poker/render/player.c b/src/card/render/player.c similarity index 100% rename from src/card/poker/render/player.c rename to src/card/render/player.c diff --git a/src/card/poker/render/player.h b/src/card/render/player.h similarity index 82% rename from src/card/poker/render/player.h rename to src/card/render/player.h index 89944101..643a18c7 100644 --- a/src/card/poker/render/player.h +++ b/src/card/render/player.h @@ -7,9 +7,9 @@ #pragma once #include -#include "../../../display/shader.h" -#include "../../../display/primitive.h" -#include "../../../display/primitives/quad.h" +#include "../../display/shader.h" +#include "../../display/primitive.h" +#include "../../display/primitives/quad.h" /** * Initializes the player renderer. diff --git a/src/card/poker/render/scene.c b/src/card/render/scene.c similarity index 100% rename from src/card/poker/render/scene.c rename to src/card/render/scene.c diff --git a/src/card/poker/render/scene.h b/src/card/render/scene.h similarity index 78% rename from src/card/poker/render/scene.h rename to src/card/render/scene.h index 149c91ad..f976d77b 100644 --- a/src/card/poker/render/scene.h +++ b/src/card/render/scene.h @@ -7,9 +7,9 @@ #pragma once #include -#include "../../../display/shader.h" -#include "../../../display/primitive.h" -#include "../../../file/asset.h" +#include "../../display/shader.h" +#include "../../display/primitive.h" +#include "../../file/asset.h" #include "../model/pokertable.h" /** diff --git a/src/game/game.h b/src/game/game.h index 934f2161..9a86d605 100644 --- a/src/game/game.h +++ b/src/game/game.h @@ -11,7 +11,7 @@ #include "../display/shader.h" #include "../file/asset.h" #include "../input/input.h" -#include "../card/poker/holdemgame.h" +#include "../card/holdemgame.h" #include "../debug/log.h" /**