mirror of
https://github.com/jorenchik/testing-spring-2024.git
synced 2025-10-21 20:10:36 +00:00
refactor: use pragma once
This commit is contained in:
parent
a343dcbe78
commit
c62cd4c413
@ -1,5 +1,4 @@
|
||||
#ifndef ACTION_HH
|
||||
#define ACTION_HH
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
struct Action {
|
||||
@ -9,5 +8,3 @@ struct Action {
|
||||
Action(std::string name, bool has_target);
|
||||
bool operator==(const Action &other) const;
|
||||
};
|
||||
|
||||
#endif // !ACTION_HH
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
#ifndef EVENT_HH
|
||||
#define EVENT_HH
|
||||
#pragma once
|
||||
|
||||
#include "./action.hh"
|
||||
|
||||
@ -42,5 +41,3 @@ struct Event {
|
||||
std::initializer_list<Action> prohibits,
|
||||
std::initializer_list<Action> allows);
|
||||
};
|
||||
|
||||
#endif // !EVENT_HH
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
#ifndef PLAYER_HH
|
||||
#define PLAYER_HH
|
||||
|
||||
#pragma once
|
||||
#include "./role.hh"
|
||||
|
||||
#include <cstdint>
|
||||
@ -24,5 +22,3 @@ struct Player {
|
||||
Player(uint32_t id, std::string username, Role role, player::Status status);
|
||||
bool operator==(const Player &other) const;
|
||||
};
|
||||
|
||||
#endif // !PLAYER_HH
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
#ifndef ROLE_HH
|
||||
#define ROLE_HH
|
||||
#pragma once
|
||||
|
||||
#include "./action.hh"
|
||||
|
||||
@ -11,5 +10,3 @@ struct Role {
|
||||
explicit Role(std::vector<Action> actions);
|
||||
Role(std::initializer_list<Action> actions);
|
||||
};
|
||||
|
||||
#endif // !ROLE_HH
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
#ifndef ROOM_HH
|
||||
#define ROOM_HH
|
||||
#pragma once
|
||||
|
||||
#include "./player.hh"
|
||||
|
||||
@ -29,5 +28,3 @@ struct Room {
|
||||
Room(
|
||||
uint32_t id, std::string title, uint32_t created_at, room::Status status, std::initializer_list<Player> players);
|
||||
};
|
||||
|
||||
#endif // !ROOM_HH
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
#ifndef TIME_HH
|
||||
#define TIME_HH
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <ctime>
|
||||
|
||||
std::tm *create_utc_timestamp(uint32_t timestamp);
|
||||
|
||||
#endif // !TIME_HH
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
#ifndef VALIDATION_HH
|
||||
#define VALIDATION_HH
|
||||
|
||||
#pragma once
|
||||
#include "modules/event.hh"
|
||||
#include "modules/player.hh"
|
||||
#include "modules/room.hh"
|
||||
@ -24,5 +22,3 @@ namespace validation {
|
||||
} // namespace validation
|
||||
|
||||
int validate_action(Player *actor, const Action *action, Room *room, std::vector<Event> *relatedEvents, Player *target);
|
||||
|
||||
#endif // !VALIDATION_HH
|
||||
|
||||
Loading…
Reference in New Issue
Block a user