R
Size: a a a
R
R
R
A
m
R
R
R
A
R
R
R
R
R
R
M
//
// Created by ivantretyak on 19.03.2021.
//
#ifndef TEST_INT_SECTION_H
#define TEST_INT_SECTION_H
#include <string>
enum SectionType {
empty,
cell,
food
};
class ISection {
public:
virtual SectionType getType() = 0;
virtual std::string getItem(std::string item) = 0;
virtual int getItem() = 0;
int item;
};
class FoodSection : public ISection {
public:
SectionType getType() override;
int getItem() override;
FoodSection();
std::string getItem(std::string item) override;
private:
SectionType type = food;
};
class CellSection : public ISection {
public:
SectionType getType() override;
std::string getItem(std::string item) override;
int getItem() override;
CellSection();
std::string item = "Tss";
private:
SectionType type = cell;
};
class EmptySection : public ISection {
public:
SectionType getType() override;
std::string getItem(std::string item);
int getItem() override;
EmptySection();
std::string item = "TS";
private:
SectionType type = empty;
};
#endif //TEST_INT_SECTION_H
R