Created
January 5, 2020 18:33
-
-
Save pileon/997b1646b6c2578a23a1d0494d1c1453 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Event.h" | |
#include <iostream> | |
namespace events { | |
TargetType Event::getTarget() { | |
return target; | |
} | |
std::string Event::getDescription() { | |
return description; | |
} | |
bool Event::getDone() { | |
return done; | |
} | |
Event::~Event() = default; | |
Event::Event() = default; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef POKERSIMULATIONSINCPP_EVENT_H | |
#define POKERSIMULATIONSINCPP_EVENT_H | |
#include <iostream> | |
//#include "game/Table.h" | |
//#include "players/Player.h" | |
namespace events { | |
enum TargetType { | |
Dealer, Table, None, Players | |
}; | |
class Event { | |
private: | |
TargetType target = None; | |
std::string description = "Base event class"; | |
bool done = false; | |
public: | |
~Event(); | |
Event(); | |
TargetType getTarget(); | |
std::string getDescription(); | |
bool getDone(); | |
}; | |
} | |
#endif //POKERSIMULATIONSINCPP_EVENT_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef POKERSIMULATIONSINCPP_EVENTPTR_H | |
#define POKERSIMULATIONSINCPP_EVENTPTR_H | |
#include <memory> | |
#include "Event.h" | |
namespace events { | |
typedef std::shared_ptr<Event> EventPtr; | |
} | |
#endif //POKERSIMULATIONSINCPP_EVENTPTR_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "EventPtr.h" | |
void foo() | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXXFLAGS = -Wall -Wextra -Wpedantic | |
all: Event.o foo.cpp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment