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
15struct Player {
16 int id;
17 int x;
18 int y;
21 int level = 1;
22 std::string teamName;
24 bool isIncanting = false;
25
26 std::deque<std::string> commandQueue;
27 bool hasActiveAction = false;
28};
Orientation
Represents the resources available in the game, including food and various minerals.
Definition Resources.hpp:17
Represents a player in the game Each player has an ID, position (x, y), orientation,...
Definition Player.hpp:15
int id
Definition Player.hpp:16
Resources inventory
Definition Player.hpp:23
int y
Definition Player.hpp:18
bool hasActiveAction
Definition Player.hpp:27
int level
Definition Player.hpp:21
int connectionId
Definition Player.hpp:19
Orientation orientation
Definition Player.hpp:20
std::string teamName
Definition Player.hpp:22
int x
Definition Player.hpp:17
std::deque< std::string > commandQueue
Definition Player.hpp:26
bool isIncanting
Definition Player.hpp:24