Zappy Server
C++ game server: world, rules, scheduler, network
Loading...
Searching...
No Matches
Player.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <deque>
4
#include <string>
5
6
#include "
Orientation.hpp
"
7
#include "
Resources.hpp
"
8
15
struct
Player
{
16
int
id
;
17
int
x
;
18
int
y
;
19
int
connectionId
;
20
Orientation
orientation
;
21
int
level
= 1;
22
std::string
teamName
;
23
Resources
inventory
;
24
bool
isIncanting
=
false
;
25
26
std::deque<std::string>
commandQueue
;
27
bool
hasActiveAction
=
false
;
28
};
Orientation.hpp
Orientation
Orientation
Resources.hpp
Resources
Represents the resources available in the game, including food and various minerals.
Definition
Resources.hpp:17
Player
Represents a player in the game Each player has an ID, position (x, y), orientation,...
Definition
Player.hpp:15
Player::id
int id
Definition
Player.hpp:16
Player::inventory
Resources inventory
Definition
Player.hpp:23
Player::y
int y
Definition
Player.hpp:18
Player::hasActiveAction
bool hasActiveAction
Definition
Player.hpp:27
Player::level
int level
Definition
Player.hpp:21
Player::connectionId
int connectionId
Definition
Player.hpp:19
Player::orientation
Orientation orientation
Definition
Player.hpp:20
Player::teamName
std::string teamName
Definition
Player.hpp:22
Player::x
int x
Definition
Player.hpp:17
Player::commandQueue
std::deque< std::string > commandQueue
Definition
Player.hpp:26
Player::isIncanting
bool isIncanting
Definition
Player.hpp:24
server
src
core
data
Player.hpp
Generated by
1.9.8