Refactoring, Exception handling and Events.
This commit is contained in:
parent
b159f83c63
commit
a3df4a3189
14 changed files with 1377 additions and 916 deletions
39
src/Events.hpp
Normal file
39
src/Events.hpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
#include <SDL2/SDL.h>
|
||||
#include <boost/uuid/uuid.hpp>
|
||||
#include "Grid.hpp"
|
||||
#include "Gameplay.hpp"
|
||||
|
||||
#ifndef _EVENTS_H
|
||||
#define _EVENTS_H
|
||||
|
||||
class Timer
|
||||
{
|
||||
private:
|
||||
Uint32 timer_started;
|
||||
public:
|
||||
void start_timer();
|
||||
|
||||
Uint32 get_timer();
|
||||
|
||||
Uint32 reset_timer();
|
||||
};
|
||||
|
||||
struct NextTurn
|
||||
{
|
||||
boost::uuids::uuid player;
|
||||
Uint32 time_elapsed;
|
||||
};
|
||||
|
||||
struct MarkerUpdate
|
||||
{
|
||||
FieldMeta *field;
|
||||
};
|
||||
|
||||
struct FieldUpdate
|
||||
{
|
||||
FieldMeta *field;
|
||||
};
|
||||
|
||||
Uint32 register_events(Uint32 n);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue