|
Eile Mit Weile
|
Represents a home space on the board. More...
#include <HomeField.hpp>
Static Public Member Functions | |
| static HomeField * | FromJson (const rapidjson::Value &json) |
Private Member Functions | |
| HomeField (std::string id, unsigned int space_idx, unsigned int color_idx, std::vector< Figure * > figures) | |
Private Attributes | |
| unsigned | _color_idx |
Additional Inherited Members | |
Protected Member Functions inherited from Space | |
| Space (std::string id, unsigned space_idx, std::vector< Figure * > figures) | |
Protected Member Functions inherited from UniqueSerializable | |
| UniqueSerializable () | |
| UniqueSerializable (std::string id) | |
Protected Attributes inherited from Space | |
| std::vector< Figure * > | _figures |
| unsigned | _space_idx |
Protected Attributes inherited from UniqueSerializable | |
| std::string | id |
Represents a home space on the board.
The home field is the space where figures are moved to when they are kicked back to home and where they are placed at the start of the game.
Constructor: creates a HomeField with a space index (_space_idx) and a color id (_color_idx)
|
private |
Deserialization constructor used by FromJson
|
static |
Deserializes a HomeField object from a json object. Used by client.
Getter for _color_idx. Currently unused as the space index is sufficient for identification of color
Returns the type of the space. For home fields this is 2. Currently never used as home fields are identifiably by space index.
Reimplemented from Space.
|
overridevirtual |
Serializes a HomeField object into a json object. Used by server.
Implements Serializable.
|
private |
The color id of the home field. Used to identify the player that owns the home field.