|
Eile Mit Weile
|
Represents a finish area on the board. More...
#include <FinishArea.hpp>
Public Member Functions | |
| FinishArea () | |
| unsigned int | GetTypeOfSpace () const override |
| void | WriteIntoJson (rapidjson::Value &json, rapidjson::Document::AllocatorType &allocator) const override |
Public Member Functions inherited from Space | |
| Space (unsigned space_idx, std::vector< Figure * > figures=std::vector< Figure * >(0)) | |
| ~Space () | |
| virtual unsigned | AddFigure (Figure *figure) |
| virtual Figure * | RemoveFigure (Figure *figure) |
| virtual std::vector< Figure * > | GetFigures () |
| unsigned | GetSpaceIdx () const |
| virtual bool | IsBlocked () const |
| void | WriteIntoJson (rapidjson::Value &json, rapidjson::Document::AllocatorType &allocator) const override |
Public Member Functions inherited from UniqueSerializable | |
| std::string | GetId () const |
| void | WriteIntoJson (rapidjson::Value &json, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator) const override |
Public Member Functions inherited from Serializable | |
| virtual rapidjson::Document * | ToJson () const |
Static Public Member Functions | |
| static FinishArea * | FromJson (const rapidjson::Value &json) |
Private Member Functions | |
| FinishArea (std::string id, std::vector< Figure * > figures) | |
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 finish area on the board.
The finish area is the space where figures are moved to when they reach the end of the board. To get on to it, a figure must roll the exact number of steps to reach the finish area.
| FinishArea::FinishArea | ( | ) |
Constructor: creates a FinishArea with a space index 96 (Space::_space_idx)
|
private |
Deserialization constructor used by FromJson
|
static |
Deserializes a FinishArea object from a json object. Used by client.
Returns the type of the space. For finish areas this is 3.
Reimplemented from Space.
|
overridevirtual |
Serializes a FinishArea object into a json object. Used by server.
Implements Serializable.