|
@@ -0,0 +1,121 @@
|
|
|
+#include<array>
|
|
|
+#include<iostream>
|
|
|
+#include<vector>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+class person
|
|
|
+{
|
|
|
+private:
|
|
|
+ int defense;
|
|
|
+ int blood;
|
|
|
+public:
|
|
|
+ person(int _defense,int _blood):defense(_defense),blood(_blood)
|
|
|
+ {}
|
|
|
+ int code(int x)
|
|
|
+ {
|
|
|
+ auto i=static_cast<int>(defense+blood);
|
|
|
+ return i;
|
|
|
+ }
|
|
|
+
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+enum character
|
|
|
+{
|
|
|
+ defense,
|
|
|
+ blood,
|
|
|
+ attact
|
|
|
+};
|
|
|
+
|
|
|
+class group
|
|
|
+{
|
|
|
+private:
|
|
|
+ std::array<int,attact> human;
|
|
|
+public:
|
|
|
+ int code()
|
|
|
+ {
|
|
|
+ int count=0;
|
|
|
+ for(int i:human)
|
|
|
+ {
|
|
|
+ count+=i;
|
|
|
+ }
|
|
|
+ return count;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+enum class type
|
|
|
+{
|
|
|
+ photo,
|
|
|
+ cartoon,
|
|
|
+ draws,
|
|
|
+};
|
|
|
+class griph_base
|
|
|
+{
|
|
|
+public:
|
|
|
+ virtual void draw()=0;
|
|
|
+};
|
|
|
+
|
|
|
+class draws:public griph_base
|
|
|
+{
|
|
|
+private:
|
|
|
+ type typide;
|
|
|
+ std::array<int,15> data;
|
|
|
+public:
|
|
|
+ void draw()override
|
|
|
+ {
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+class photo:public griph_base
|
|
|
+{
|
|
|
+private:
|
|
|
+ type typide;
|
|
|
+ std::array<int,15> data;
|
|
|
+public:
|
|
|
+ void draw()override
|
|
|
+ {
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+class cartoon:public griph_base
|
|
|
+{
|
|
|
+private:
|
|
|
+ type typide;
|
|
|
+ std::array<int,15> data;
|
|
|
+public:
|
|
|
+ void draw()override
|
|
|
+ {
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+class map_combinate
|
|
|
+{
|
|
|
+private:
|
|
|
+ std::vector<griph_base*> data;
|
|
|
+public:
|
|
|
+ void draw()
|
|
|
+ {
|
|
|
+ for(auto i:data)
|
|
|
+ {
|
|
|
+ i->draw();
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+int main()
|
|
|
+{
|
|
|
+
|
|
|
+}
|