Eile Mit Weile
Loading...
Searching...
No Matches
LadderSpace.hpp
1#ifndef EILEMITWEILE_LADDERSPACE_HPP
2#define EILEMITWEILE_LADDERSPACE_HPP
3#include "Space.hpp"
4
13class LadderSpace: public Space {
14 public:
15 LadderSpace(unsigned space_idx, int color);
16 [[nodiscard]] Color GetColor() const;
17 [[nodiscard]] unsigned GetTypeOfSpace() const override;
18 static LadderSpace* FromJson(const rapidjson::Value& json);
19 void WriteIntoJson(rapidjson::Value& json, rapidjson::Document::AllocatorType& allocator) const override;
21 private:
23 LadderSpace(std::string id, unsigned space_idx, std::vector<Figure*> figures, int color);
24};
25#endif //EILEMITWEILE_LADDERSPACE_HPP
Color
Enum for the colors of the players.
Definition Player.hpp:15
Represents a ladder space on the board.
Definition LadderSpace.hpp:13
unsigned GetTypeOfSpace() const override
Definition LadderSpace.cpp:17
Color _color
Definition LadderSpace.hpp:22
void WriteIntoJson(rapidjson::Value &json, rapidjson::Document::AllocatorType &allocator) const override
Definition LadderSpace.cpp:35
LadderSpace(std::string id, unsigned space_idx, std::vector< Figure * > figures, int color)
LadderSpace(unsigned space_idx, int color)
static LadderSpace * FromJson(const rapidjson::Value &json)
Definition LadderSpace.cpp:21
Color GetColor() const
Definition LadderSpace.cpp:13
Abstract Base Class. Represents a space on the board.
Definition Space.hpp:28