mirror of
https://github.com/jorenchik/testing-spring-2024.git
synced 2025-10-21 20:10:36 +00:00
feat: remove caused by from event
This commit is contained in:
parent
6fdf800fbd
commit
db4a4be369
@ -23,9 +23,9 @@ void run() {
|
|||||||
const Action vote = Action("vote", true);
|
const Action vote = Action("vote", true);
|
||||||
Role role1({vote, kill, heal});
|
Role role1({vote, kill, heal});
|
||||||
Role role2({heal});
|
Role role2({heal});
|
||||||
Event event1 = Event("Event 1", 1710087355, 1, true, {vote}, {}, {});
|
Event event1 = Event("Event 1", 1710087355, 1, true, {}, {});
|
||||||
Event event2 = Event("Event 2", 1710087363, 1, true, {}, {kill}, {});
|
Event event2 = Event("Event 2", 1710087363, 1, true, {kill}, {});
|
||||||
Event event3 = Event("Event 3", 1710087369, 1, true, {}, {}, {kill});
|
Event event3 = Event("Event 3", 1710087369, 1, true, {}, {kill});
|
||||||
std::vector<Event> relatedEvents({event2, event3});
|
std::vector<Event> relatedEvents({event2, event3});
|
||||||
Player player1 = Player("player1", role1, PlayerStatus::ALIVE);
|
Player player1 = Player("player1", role1, PlayerStatus::ALIVE);
|
||||||
Player player2 = Player("player2", role1, PlayerStatus::ALIVE);
|
Player player2 = Player("player2", role1, PlayerStatus::ALIVE);
|
||||||
|
|||||||
@ -46,7 +46,6 @@ Event::Event(std::string title,
|
|||||||
uint32_t utcTimestampCreatedAt,
|
uint32_t utcTimestampCreatedAt,
|
||||||
uint32_t numberNight,
|
uint32_t numberNight,
|
||||||
bool isVisible,
|
bool isVisible,
|
||||||
std::vector<Action> causedBy,
|
|
||||||
std::vector<Action> prohibits,
|
std::vector<Action> prohibits,
|
||||||
std::vector<Action> allows):
|
std::vector<Action> allows):
|
||||||
title(title),
|
title(title),
|
||||||
@ -54,9 +53,6 @@ Event::Event(std::string title,
|
|||||||
numberNight(numberNight),
|
numberNight(numberNight),
|
||||||
isVisible(isVisible) {
|
isVisible(isVisible) {
|
||||||
this->utcTimestampCreatedAt = createUTCTimestamp(utcTimestampCreatedAt);
|
this->utcTimestampCreatedAt = createUTCTimestamp(utcTimestampCreatedAt);
|
||||||
for (auto &a : causedBy) {
|
|
||||||
this->causedBy.push_back(a);
|
|
||||||
}
|
|
||||||
for (auto &a : prohibits) {
|
for (auto &a : prohibits) {
|
||||||
this->prohibits.push_back(a);
|
this->prohibits.push_back(a);
|
||||||
}
|
}
|
||||||
@ -69,14 +65,12 @@ Event::Event(std::string title,
|
|||||||
uint32_t utcTimestampCreatedAt,
|
uint32_t utcTimestampCreatedAt,
|
||||||
uint32_t numberNight,
|
uint32_t numberNight,
|
||||||
bool isVisible,
|
bool isVisible,
|
||||||
std::initializer_list<Action> causedBy,
|
|
||||||
std::initializer_list<Action> prohibits,
|
std::initializer_list<Action> prohibits,
|
||||||
std::initializer_list<Action> allows):
|
std::initializer_list<Action> allows):
|
||||||
Event(title,
|
Event(title,
|
||||||
utcTimestampCreatedAt,
|
utcTimestampCreatedAt,
|
||||||
numberNight,
|
numberNight,
|
||||||
isVisible,
|
isVisible,
|
||||||
std::vector<Action>(causedBy),
|
|
||||||
std::vector<Action>(prohibits),
|
std::vector<Action>(prohibits),
|
||||||
std::vector<Action>(allows)) {
|
std::vector<Action>(allows)) {
|
||||||
this->utcTimestampCreatedAt = createUTCTimestamp(utcTimestampCreatedAt);
|
this->utcTimestampCreatedAt = createUTCTimestamp(utcTimestampCreatedAt);
|
||||||
|
|||||||
@ -74,7 +74,6 @@ struct Event {
|
|||||||
std::tm *utcTimestampCreatedAt;
|
std::tm *utcTimestampCreatedAt;
|
||||||
uint32_t numberNight;
|
uint32_t numberNight;
|
||||||
bool isVisible;
|
bool isVisible;
|
||||||
std::vector<Action> causedBy;
|
|
||||||
std::vector<Action> prohibits;
|
std::vector<Action> prohibits;
|
||||||
std::vector<Action> allows;
|
std::vector<Action> allows;
|
||||||
|
|
||||||
@ -86,14 +85,12 @@ struct Event {
|
|||||||
uint32_t utcTimestampCreatedAt,
|
uint32_t utcTimestampCreatedAt,
|
||||||
uint32_t numberNight,
|
uint32_t numberNight,
|
||||||
bool isVisible,
|
bool isVisible,
|
||||||
std::vector<Action> causedBy,
|
|
||||||
std::vector<Action> prohibits,
|
std::vector<Action> prohibits,
|
||||||
std::vector<Action> allows);
|
std::vector<Action> allows);
|
||||||
Event(std::string title,
|
Event(std::string title,
|
||||||
uint32_t utcTimestampCreatedAt,
|
uint32_t utcTimestampCreatedAt,
|
||||||
uint32_t numberNight,
|
uint32_t numberNight,
|
||||||
bool isVisible,
|
bool isVisible,
|
||||||
std::initializer_list<Action> causedBy,
|
|
||||||
std::initializer_list<Action> prohibits,
|
std::initializer_list<Action> prohibits,
|
||||||
std::initializer_list<Action> allows);
|
std::initializer_list<Action> allows);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user