Zappy Server
C++ game server: world, rules, scheduler, network
Loading...
Searching...
No Matches
Player Struct Reference

Represents a player in the game Each player has an ID, position (x, y), orientation, level, team name, inventory of resources, and a command queue. The player can also be in the process of incanting (see the subject cuh) the max commands a player can queue is 10. More...

#include <Player.hpp>

+ Collaboration diagram for Player:

Public Attributes

int id
 
int x
 
int y
 
int connectionId
 
Orientation orientation
 
int level = 1
 
std::string teamName
 
Resources inventory
 
bool isIncanting = false
 
std::deque< std::string > commandQueue
 
bool hasActiveAction = false
 

Detailed Description

Represents a player in the game Each player has an ID, position (x, y), orientation, level, team name, inventory of resources, and a command queue. The player can also be in the process of incanting (see the subject cuh) the max commands a player can queue is 10.

Definition at line 15 of file Player.hpp.

Member Data Documentation

◆ commandQueue

std::deque<std::string> Player::commandQueue

Definition at line 26 of file Player.hpp.

◆ connectionId

int Player::connectionId

Definition at line 19 of file Player.hpp.

Referenced by CommandDispatcher::_handleIncantation(), and World::addPlayer().

◆ hasActiveAction

bool Player::hasActiveAction = false

Definition at line 27 of file Player.hpp.

◆ id

int Player::id

Definition at line 16 of file Player.hpp.

Referenced by World::addPlayer().

◆ inventory

Resources Player::inventory

Definition at line 23 of file Player.hpp.

Referenced by World::addPlayer().

◆ isIncanting

bool Player::isIncanting = false

Definition at line 24 of file Player.hpp.

◆ level

int Player::level = 1

Definition at line 21 of file Player.hpp.

Referenced by World::addPlayer().

◆ orientation

Orientation Player::orientation

Definition at line 20 of file Player.hpp.

Referenced by World::addPlayer().

◆ teamName

std::string Player::teamName

Definition at line 22 of file Player.hpp.

Referenced by CommandDispatcher::_onAiJoined(), and World::addPlayer().

◆ x

int Player::x

Definition at line 17 of file Player.hpp.

Referenced by CommandDispatcher::_handleIncantation(), and World::addPlayer().

◆ y

int Player::y

Definition at line 18 of file Player.hpp.

Referenced by World::addPlayer().


The documentation for this struct was generated from the following file: