forked from mas-bandwidth/cubes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.h
43 lines (36 loc) · 893 Bytes
/
game.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright © 2015, The Network Protocol Company, Inc. All Rights Reserved.
#ifndef GAME_H
#define GAME_H
struct Input
{
bool left;
bool right;
bool up;
bool down;
bool push;
bool pull;
Input()
{
left = false;
right = false;
up = false;
down = false;
push = false;
pull = false;
}
bool operator == ( const Input & other )
{
return left == other.left &&
right == other.right &&
up == other.up &&
down == other.down &&
push == other.push &&
pull == other.pull;
}
bool operator != ( const Input & other )
{
return ! ( (*this) == other );
}
};
extern void game_process_player_input( struct World & world, const Input & input, int player_id );
#endif // #ifndef GAME_H