Just breaking stuff

This commit is contained in:
2023-03-14 22:27:46 -07:00
parent 795e69237c
commit 09cb20271b
156 changed files with 4218 additions and 4389 deletions

View File

@ -0,0 +1,10 @@
# Copyright (c) 2022 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DAWN_TARGET_NAME}
PRIVATE
PokerBetLoopEvent.cpp
)

View File

@ -0,0 +1,64 @@
// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "PokerBetLoopEvent.hpp"
#include "PokerInitialEvent.hpp"
using namespace Dawn;
void PokerBetLoopEvent::onStart(IVisualNovelEvent *prev) {
PokerGameEvent::onStart(prev);
std::cout << "Bet Loop, bet" << std::endl;
auto evt2 = new PokerDetermineBetterEvent(this->manager);
auto betting = this->then(evt2);
betting
// ->whenEveryoneFolded(new VisualNovelTextboxEvent(this->manager, "Everyone Folded"))
->then(new PokerWinnerEvent(this->manager))
->then(new PokerInitialEvent(this->manager))
;
betting
// ->whenBettingFinished(new VisualNovelTextboxEvent(this->manager, "Betting Finished"))
->then(new PokerWinnerEvent(this->manager))
->then(new PokerInitialEvent(this->manager))
;
betting
->whenTurn(new PokerTurnEvent(this->manager))
// ->then(new VisualNovelTextboxEvent(this->manager, "Turn Time"))
->then(new PokerNewBettingRoundEvent(this->manager))
->then(new PokerBetLoopEvent(this->manager))
;
betting
// ->whenHumanBet(new VisualNovelTextboxEvent(this->manager, "Human Bet"))
->then(new PokerBetLoopEvent(this->manager))
;
// AI Betting
auto aiBet = betting
// ->whenAiBet(new VisualNovelTextboxEvent(this->manager, "AI Bet"))
->then(new PokerAIBetEvent(this->manager))
;
aiBet
// ->whenFolded(new VisualNovelTextboxEvent(this->manager, "Folded"))
->then(new PokerBetLoopEvent(this->manager))
;
aiBet
// ->whenAllIn(new VisualNovelTextboxEvent(this->manager, "All In"))
->then(new PokerBetLoopEvent(this->manager))
;
aiBet
// ->whenBetting(new VisualNovelTextboxEvent(this->manager, "Betting"))
->then(new PokerBetLoopEvent(this->manager))
;
aiBet
// ->whenCalling(new VisualNovelTextboxEvent(this->manager, "Calling"))
->then(new PokerBetLoopEvent(this->manager))
;
aiBet
// ->whenChecking(new VisualNovelTextboxEvent(this->manager, "Checking"))
->then(new PokerBetLoopEvent(this->manager))
;
}

View File

@ -0,0 +1,36 @@
// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "poker/visualnovel/PokerNewGameEvent.hpp"
#include "poker/visualnovel/PokerNewRoundEvent.hpp"
#include "poker/visualnovel/PokerTakeBlindsEvent.hpp"
#include "poker/visualnovel/PokerDealEvent.hpp"
#include "poker/visualnovel/PokerTurnEvent.hpp"
#include "poker/visualnovel/PokerDetermineBetterEvent.hpp"
#include "poker/visualnovel/PokerAIBetEvent.hpp"
#include "poker/visualnovel/PokerNewBettingRoundEvent.hpp"
#include "poker/visualnovel/PokerWinnerEvent.hpp"
#define POKER_DEAL_EVENT_CARD_COUNT 2
namespace Dawn {
class PokerBetLoopEvent : public PokerGameEvent {
protected:
void onStart(IVisualNovelEvent *previous) override;
bool_t onUpdate() override {
return false;
}
void onEnd() override {
std::cout << "Bet lop fin" << std::endl;
}
public:
PokerBetLoopEvent(VisualNovelManager *manager) : PokerGameEvent(manager) {
}
};
}

View File

@ -0,0 +1,43 @@
// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "poker/visualnovel/PokerNewRoundEvent.hpp"
#include "poker/visualnovel/PokerDealEvent.hpp"
#include "poker/visualnovel/PokerTakeBlindsEvent.hpp"
#include "PokerBetLoopEvent.hpp"
#include "visualnovel/events/VisualNovelTextboxEvent.hpp"
#define POKER_DEAL_EVENT_CARD_COUNT 2
namespace Dawn {
class PokerInitialEvent : public PokerGameEvent {
protected:
void onStart(IVisualNovelEvent *previous) override {
PokerGameEvent::onStart(previous);
this
->then(new PokerNewRoundEvent(this->manager))
// ->then(new VisualNovelTextboxEvent(this->manager, "Round Started"))
->then(new PokerTakeBlindsEvent(this->manager))
// ->then(new VisualNovelTextboxEvent(this->manager, "Blinds Taken"))
->then(new PokerDealEvent(this->manager))
// ->then(new VisualNovelTextboxEvent(this->manager, "Cards Dealt"))
->then(new PokerBetLoopEvent(this->manager))
;
}
bool_t onUpdate() override {
return false;
}
void onEnd() override {
}
public:
PokerInitialEvent(VisualNovelManager *manager) : PokerGameEvent(manager) {
}
};
}