Browse Source

Fixing dublicating files

Ivan Arkhipov 6 years ago
parent
commit
db47f2fb26

+ 0 - 55
include/abstractfactory.h

@@ -1,55 +0,0 @@
-#pragma once
-#include <iostream>
-#include <string>
-#include <map>
-
-template <class Base, typename CreatorParam>
-class AbstractCreator {
-public:
-	virtual ~AbstractCreator() {}
-    virtual Base* create(const CreatorParam &id) const = 0;
-};
-
-template <class ObjectClass, class Base, typename CreatorParam>
-class Creator : public AbstractCreator<Base, CreatorParam> {
-public:
-    Creator() {}
-	virtual ~Creator() {}
-    Base* create(const CreatorParam &params) const {
-        return dynamic_cast<Base*>(new ObjectClass(params));
-	}
-};
-
-template <class Base, class IdType>
-class ObjectFactory {
-protected:
-	typedef AbstractCreator<Base, IdType> AbstractFactory;
-	typedef std::map<IdType, AbstractFactory*> FactoryMap;
-	FactoryMap factory_;
-
-public:
-	ObjectFactory() {}
-	virtual ~ObjectFactory() {
-		for (auto& item : factory_)
-			delete item.second;
-	}
-
-    template <class C, typename CreatorParam>
-    void addClass(const IdType &id) {
-        registerClass(id, new Creator<C, Base, CreatorParam>());
-	}
-
-    template <typename CreatorParam>
-    Base* createObject(const IdType &idClass, const CreatorParam &parameters) {
-        return factory_[idClass]->create(parameters);
-	}
-
-protected:
-	void registerClass(const IdType &id, AbstractFactory *ConcreteFabric) {
-		typename FactoryMap::iterator it = factory_.find(id);
-		if (it == factory_.end())
-			factory_[id] = ConcreteFabric;
-		else
-			delete ConcreteFabric;
-	}
-};

+ 0 - 60
include/effects/effect.h

@@ -1,60 +0,0 @@
-//
-// Created by IgorBat on 17.03.2018.
-//
-
-#ifndef THE_GAME_EFFECT_H
-#define THE_GAME_EFFECT_H
-
-#pragma once
-#include <iostream>
-#include <vector>
-
-#include <QFile>
-#include <QString>
-#include <QTextStream>
-#include <QImage>
-
-class Unit;
-class Cell;
-
-class Effect : public QObject {
-    Q_OBJECT
-
-public:
-    explicit Effect(QString parameters);
-
-    virtual ~Effect() {}
-
-    int getCount();
-    void setCount(int value);
-
-    int getDurability();
-    void setDurability(int value);
-
-    //---------------------------------------------//
-    //----------------GUI section------------------//
-    //---------------------------------------------//
-    QString getEffectName() const;
-    QString getEffectDescr() const;
-    QImage getEffectIcon() const;
-
-    //---------------------------------------------//
-    //-----------Parameters load section-----------//
-    //---------------------------------------------//
-
-private:
-    void loadEffectDescr(QString effect_folder);
-    void loadEffectIcon(QString effect_folder);
-public:
-    virtual void OperateOnCell(Cell* cell) = 0;
-    virtual void OperateOnUnit(Unit* unit) = 0;
-protected:
-    int count_;
-    int durability_;
-
-    // GUI values
-    QString effect_name_;
-    QString effect_descr_;
-    QImage effect_icon_;
-};
-#endif //THE_GAME_EFFECT_H

+ 0 - 15
include/effects/melledamage.h

@@ -1,15 +0,0 @@
-//
-// Created by IgorBat on 23.04.2018.
-//
-
-#ifndef GAME_CLIENT_MELLEDAMAGE_H
-#define GAME_CLIENT_MELLEDAMAGE_H
-#pragma once
-#include <cassert>
-#include "effect\effect.h"
-
-class melledamage : public Effect {
-    void OperateOnCell(Cell* cell);
-    void OperateOnUnit(Unit* unit);
-};
-#endif //GAME_CLIENT_MELLEDAMAGE_H

+ 0 - 16
include/effects/selfheal.h

@@ -1,16 +0,0 @@
-//
-// Created by IgorBat on 23.04.2018.
-//
-
-#ifndef GAME_CLIENT_SELFHEAL_H
-#define GAME_CLIENT_SELFHEAL_H
-#pragma once
-#include <cassert>
-#include "effect\effect.h"
-
-class selfheal : public Effect {
-    void OperateOnCell(Cell* cell);
-    void OperateOnUnit(Unit* unit);
-};
-
-#endif //GAME_CLIENT_SELFHEAL_H

+ 0 - 33
include/gui/gui.h

@@ -1,33 +0,0 @@
-#ifndef GUI_H
-#define GUI_H
-
-#include <QMainWindow>
-#include <QGraphicsScene>
-#include <QMouseEvent>
-
-namespace Ui {
-class GUI;
-}
-
-class GUI : public QMainWindow
-{
-    Q_OBJECT
-
-public:
-    explicit GUI(QWidget *parent = 0);
-    ~GUI();
-    QWidget* mainContentScene();
-
-private:
-    Ui::GUI *ui_;
-
-protected:
-    void mouseMoveEvent( QMouseEvent* e );
-    void mousePressEvent( QMouseEvent* e );
-    void mouseReleaseEvent( QMouseEvent* e );
-private:
-    int dx_;
-    int dy_;
-};
-
-#endif // GUI_H

+ 0 - 215
include/gui/gui.ui

@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>GUI</class>
- <widget class="QMainWindow" name="GUI">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>1024</width>
-    <height>800</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>GUI</string>
-  </property>
-  <widget class="QWidget" name="centralWidget">
-   <layout class="QGridLayout" name="gridLayout">
-    <property name="leftMargin">
-     <number>0</number>
-    </property>
-    <property name="topMargin">
-     <number>0</number>
-    </property>
-    <property name="rightMargin">
-     <number>0</number>
-    </property>
-    <property name="bottomMargin">
-     <number>0</number>
-    </property>
-    <property name="spacing">
-     <number>0</number>
-    </property>
-    <item row="0" column="0">
-     <widget class="QWidget" name="window_topleft_border_" native="true">
-      <property name="minimumSize">
-       <size>
-        <width>45</width>
-        <height>45</height>
-       </size>
-      </property>
-      <property name="maximumSize">
-       <size>
-        <width>45</width>
-        <height>45</height>
-       </size>
-      </property>
-      <property name="cursor">
-       <cursorShape>SizeAllCursor</cursorShape>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">background-image: url(:/assets/window/thick_opaque-border-topleft.png);</string>
-      </property>
-     </widget>
-    </item>
-    <item row="0" column="1">
-     <widget class="QWidget" name="window_top_border_" native="true">
-      <property name="cursor">
-       <cursorShape>SizeAllCursor</cursorShape>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">background-image: url(:/assets/window/thick_opaque-border-top.png);</string>
-      </property>
-     </widget>
-    </item>
-    <item row="0" column="2">
-     <widget class="QWidget" name="window_topright_border_" native="true">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="minimumSize">
-       <size>
-        <width>45</width>
-        <height>45</height>
-       </size>
-      </property>
-      <property name="maximumSize">
-       <size>
-        <width>45</width>
-        <height>45</height>
-       </size>
-      </property>
-      <property name="cursor">
-       <cursorShape>SizeAllCursor</cursorShape>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">background-image: url(:/assets/window/thick_opaque-border-topright.png);</string>
-      </property>
-     </widget>
-    </item>
-    <item row="1" column="0">
-     <widget class="QWidget" name="window_left_border_" native="true">
-      <property name="cursor">
-       <cursorShape>SizeAllCursor</cursorShape>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">background-image: url(:/assets/window/thick_opaque-border-left.png);</string>
-      </property>
-     </widget>
-    </item>
-    <item row="1" column="1">
-     <widget class="QWidget" name="main_content_" native="true">
-      <property name="autoFillBackground">
-       <bool>false</bool>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">background: url(:/assets/window/thick_opaque-background.png);</string>
-      </property>
-      <layout class="QGridLayout" name="content_">
-       <property name="leftMargin">
-        <number>0</number>
-       </property>
-       <property name="topMargin">
-        <number>0</number>
-       </property>
-       <property name="rightMargin">
-        <number>0</number>
-       </property>
-       <property name="bottomMargin">
-        <number>0</number>
-       </property>
-       <property name="spacing">
-        <number>0</number>
-       </property>
-      </layout>
-     </widget>
-    </item>
-    <item row="1" column="2">
-     <widget class="QWidget" name="window_right_border_" native="true">
-      <property name="cursor">
-       <cursorShape>SizeAllCursor</cursorShape>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">background-image: url(:/assets/window/thick_opaque-border-right.png);</string>
-      </property>
-     </widget>
-    </item>
-    <item row="2" column="0">
-     <widget class="QWidget" name="window_botleft_border_" native="true">
-      <property name="minimumSize">
-       <size>
-        <width>45</width>
-        <height>45</height>
-       </size>
-      </property>
-      <property name="maximumSize">
-       <size>
-        <width>45</width>
-        <height>45</height>
-       </size>
-      </property>
-      <property name="cursor">
-       <cursorShape>SizeAllCursor</cursorShape>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">background-image: url(:/assets/window/thick_opaque-border-botleft.png);</string>
-      </property>
-     </widget>
-    </item>
-    <item row="2" column="1">
-     <widget class="QWidget" name="window_bottom_border_" native="true">
-      <property name="cursor">
-       <cursorShape>SizeAllCursor</cursorShape>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">background-image: url(:/assets/window/thick_opaque-border-bottom.png);</string>
-      </property>
-     </widget>
-    </item>
-    <item row="2" column="2">
-     <widget class="QWidget" name="window_botright_border_" native="true">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="minimumSize">
-       <size>
-        <width>45</width>
-        <height>45</height>
-       </size>
-      </property>
-      <property name="maximumSize">
-       <size>
-        <width>45</width>
-        <height>45</height>
-       </size>
-      </property>
-      <property name="cursor">
-       <cursorShape>SizeAllCursor</cursorShape>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">background-image: url(:/assets/window/thick_opaque-border-botright.png);</string>
-      </property>
-     </widget>
-    </item>
-   </layout>
-   <zorder>main_content_</zorder>
-   <zorder>window_topleft_border_</zorder>
-   <zorder>window_top_border_</zorder>
-   <zorder>window_topright_border_</zorder>
-   <zorder>window_left_border_</zorder>
-   <zorder>window_right_border_</zorder>
-   <zorder>window_botleft_border_</zorder>
-   <zorder>window_bottom_border_</zorder>
-   <zorder>window_botright_border_</zorder>
-  </widget>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <resources/>
- <connections/>
-</ui>

+ 0 - 47
include/gui/guiscenemanager.h

@@ -1,47 +0,0 @@
-#ifndef INCLUDEGUIGUISCENEMANAGER_H
-#define INCLUDEGUIGUISCENEMANAGER_H
-
-#include <QObject>
-
-#include <map>
-
-class GUI;
-class Scene;
-
-class GuiSceneManager : public QObject
-{
-    Q_OBJECT
-private:
-    explicit GuiSceneManager(QObject *parent = nullptr);
-    ~GuiSceneManager();
-
-public:
-    static GuiSceneManager& getInstance() {
-        static GuiSceneManager instance;
-        return instance;
-    }
-
-    bool registerScene(QString scene_name, Scene* name);
-
-    bool changeScene(QString scene_name, QString args = "");
-
-    bool showDetachedScene(QString scene_name, QString args = "");
-
-    bool hideDetachedScene(QString scene_name);
-
-    bool hideMainWindow();
-
-    bool showMainWindow();
-
-private:
-    std::map<QString, Scene*> scenes_;
-
-    QString current_scene_;
-    GUI* gui_;
-
-signals:
-
-public slots:
-};
-
-#endif // INCLUDEGUIGUISCENEMANAGER_H

+ 0 - 32
include/gui/mainmenu.h

@@ -1,32 +0,0 @@
-#ifndef MAINMENU_H
-#define MAINMENU_H
-
-#include "gui/Scene.h"
-
-#include <QWidget>
-
-namespace Ui {
-class MainMenu;
-}
-
-class MainMenu : public Scene
-{
-    Q_OBJECT
-
-public:
-    explicit MainMenu(QWidget *parent = 0);
-    ~MainMenu();
-
-    void ParseArgs(QString args) {}
-
-private slots:
-
-    void on_exit_button_clicked();
-
-    void on_pvp_local_battle_button_clicked();
-
-private:
-    Ui::MainMenu *ui;
-};
-
-#endif // MAINMENU_H

+ 0 - 80
include/gui/mainmenu.ui

@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>MainMenu</class>
- <widget class="Scene" name="MainMenu">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>940</width>
-    <height>720</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <widget class="QLabel" name="title_">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>60</y>
-     <width>941</width>
-     <height>101</height>
-    </rect>
-   </property>
-   <property name="styleSheet">
-    <string notr="true">font: 14pt &quot;Barocco Initial&quot;;</string>
-   </property>
-   <property name="text">
-    <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:18pt; color:#b12d2d;&quot;&gt;Супер-мега-крутая-игрушка-название-которой-мы-еще-не-придумали&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-   </property>
-   <property name="wordWrap">
-    <bool>true</bool>
-   </property>
-  </widget>
-  <widget class="QPushButton" name="pvp_local_battle_button">
-   <property name="geometry">
-    <rect>
-     <x>200</x>
-     <y>190</y>
-     <width>481</width>
-     <height>251</height>
-    </rect>
-   </property>
-   <property name="styleSheet">
-    <string notr="true">font: 16pt &quot;Viking Cyr&quot;;
-color: rgb(255, 255, 0);</string>
-   </property>
-   <property name="text">
-    <string>Игрок против игрока</string>
-   </property>
-  </widget>
-  <widget class="QPushButton" name="exit_button">
-   <property name="geometry">
-    <rect>
-     <x>200</x>
-     <y>470</y>
-     <width>481</width>
-     <height>221</height>
-    </rect>
-   </property>
-   <property name="styleSheet">
-    <string notr="true">font: 16pt &quot;Viking Cyr&quot;;
-color: rgb(255, 255, 0);</string>
-   </property>
-   <property name="text">
-    <string>Выйти из игры</string>
-   </property>
-  </widget>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>Scene</class>
-   <extends>QWidget</extends>
-   <header location="global">gui/scene.h</header>
-   <container>1</container>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>

+ 0 - 23
include/gui/scene.h

@@ -1,23 +0,0 @@
-#ifndef INCLUDEGUISCENE_H
-#define INCLUDEGUISCENE_H
-
-#include <QWidget>
-
-class Scene : public QWidget
-{
-    Q_OBJECT
-public:
-    explicit Scene(QWidget *parent = nullptr);
-
-    virtual ~Scene() {}
-
-    virtual void parseArgs(QString) {}
-
-    virtual void init() {}
-
-signals:
-
-public slots:
-};
-
-#endif // INCLUDEGUISCENE_H

+ 0 - 30
include/hotseatgame/gui/hotseatgame.h

@@ -1,30 +0,0 @@
-#ifndef HOTSEATGAME_H
-#define HOTSEATGAME_H
-
-#include <QWidget>
-#include "gui/scene.h"
-
-namespace Ui {
-class HotSeatGame;
-}
-
-class HotSeatGame : public Scene
-{
-    Q_OBJECT
-
-public:
-    explicit HotSeatGame(QWidget *parent = 0);
-    ~HotSeatGame();
-
-    void init() override;
-
-
-private slots:
-
-    void on_surrender_button__clicked();
-
-private:
-    Ui::HotSeatGame *ui;
-};
-
-#endif // HOTSEATGAME_H

+ 0 - 1625
include/hotseatgame/gui/hotseatgame.ui

@@ -1,1625 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>HotSeatGame</class>
- <widget class="QWidget" name="HotSeatGame">
-  <property name="windowModality">
-   <enum>Qt::ApplicationModal</enum>
-  </property>
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>1421</width>
-    <height>907</height>
-   </rect>
-  </property>
-  <property name="sizePolicy">
-   <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <property name="sizeIncrement">
-   <size>
-    <width>0</width>
-    <height>0</height>
-   </size>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <property name="autoFillBackground">
-   <bool>false</bool>
-  </property>
-  <property name="styleSheet">
-   <string notr="true">background-image: url(:/assets/window/thick_opaque-background.png);</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <property name="leftMargin">
-    <number>0</number>
-   </property>
-   <property name="topMargin">
-    <number>0</number>
-   </property>
-   <property name="rightMargin">
-    <number>0</number>
-   </property>
-   <property name="bottomMargin">
-    <number>0</number>
-   </property>
-   <property name="spacing">
-    <number>0</number>
-   </property>
-   <item row="0" column="0">
-    <widget class="QWidget" name="content_" native="true">
-     <layout class="QGridLayout" name="gridLayout_8">
-      <property name="leftMargin">
-       <number>15</number>
-      </property>
-      <property name="topMargin">
-       <number>15</number>
-      </property>
-      <property name="rightMargin">
-       <number>15</number>
-      </property>
-      <property name="bottomMargin">
-       <number>15</number>
-      </property>
-      <item row="0" column="0">
-       <widget class="QWidget" name="unit_chars_widget_" native="true">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize">
-         <size>
-          <width>250</width>
-          <height>0</height>
-         </size>
-        </property>
-        <property name="layoutDirection">
-         <enum>Qt::LeftToRight</enum>
-        </property>
-        <property name="autoFillBackground">
-         <bool>false</bool>
-        </property>
-        <property name="styleSheet">
-         <string notr="true"/>
-        </property>
-        <layout class="QGridLayout" name="gridLayout_4">
-         <property name="leftMargin">
-          <number>0</number>
-         </property>
-         <property name="topMargin">
-          <number>0</number>
-         </property>
-         <property name="rightMargin">
-          <number>0</number>
-         </property>
-         <property name="bottomMargin">
-          <number>0</number>
-         </property>
-         <property name="spacing">
-          <number>0</number>
-         </property>
-         <item row="5" column="1">
-          <spacer name="verticalSpacer_2">
-           <property name="orientation">
-            <enum>Qt::Vertical</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Fixed</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>20</width>
-             <height>15</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item row="2" column="1" colspan="3">
-          <widget class="QLabel" name="unit_name_">
-           <property name="minimumSize">
-            <size>
-             <width>0</width>
-             <height>0</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>16777215</width>
-             <height>50</height>
-            </size>
-           </property>
-           <property name="font">
-            <font>
-             <family>Viking Cyr</family>
-             <pointsize>10</pointsize>
-            </font>
-           </property>
-           <property name="text">
-            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; color:#68fafa;&quot;&gt;Название юнита&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-           </property>
-          </widget>
-         </item>
-         <item row="3" column="1">
-          <spacer name="verticalSpacer">
-           <property name="orientation">
-            <enum>Qt::Vertical</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Fixed</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>20</width>
-             <height>15</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item row="1" column="2">
-          <widget class="QLabel" name="unit_icon_">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="minimumSize">
-            <size>
-             <width>150</width>
-             <height>150</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>150</width>
-             <height>150</height>
-            </size>
-           </property>
-           <property name="layoutDirection">
-            <enum>Qt::LeftToRight</enum>
-           </property>
-           <property name="frameShape">
-            <enum>QFrame::Panel</enum>
-           </property>
-           <property name="frameShadow">
-            <enum>QFrame::Sunken</enum>
-           </property>
-           <property name="lineWidth">
-            <number>5</number>
-           </property>
-           <property name="text">
-            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;:/assets/units/human/atraty-rider/icon.png&quot; width=&quot;120&quot; height=&quot;120&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-           </property>
-           <property name="alignment">
-            <set>Qt::AlignCenter</set>
-           </property>
-          </widget>
-         </item>
-         <item row="8" column="1">
-          <spacer name="verticalSpacer_4">
-           <property name="orientation">
-            <enum>Qt::Vertical</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Fixed</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>20</width>
-             <height>15</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item row="9" column="1" colspan="3">
-          <widget class="QLabel" name="char_traits_">
-           <property name="minimumSize">
-            <size>
-             <width>250</width>
-             <height>0</height>
-            </size>
-           </property>
-           <property name="frameShape">
-            <enum>QFrame::Panel</enum>
-           </property>
-           <property name="frameShadow">
-            <enum>QFrame::Sunken</enum>
-           </property>
-           <property name="lineWidth">
-            <number>0</number>
-           </property>
-           <property name="text">
-            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt; font-weight:600; color:#d1d100;&quot;&gt;Характеристики:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#ffffff;&quot;&gt;Очки жизни: 9087654&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#ffffff;&quot;&gt;Атака: 219-18927&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#ffffff;&quot;&gt;Инициатива: 187&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#ffffff;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#ffffff;&quot;&gt;Сила: 1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#ffffff;&quot;&gt;Ловкость: 1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#ffffff;&quot;&gt;Интеллект: 4&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#ffffff;&quot;&gt;Физ. защита: 1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#ffffff;&quot;&gt;Маг. защита: 3&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-           </property>
-           <property name="alignment">
-            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-           </property>
-           <property name="margin">
-            <number>10</number>
-           </property>
-          </widget>
-         </item>
-         <item row="11" column="2">
-          <widget class="QPushButton" name="surrender_button_">
-           <property name="styleSheet">
-            <string notr="true">color: rgb(159, 159, 0);</string>
-           </property>
-           <property name="text">
-            <string>Сдаться</string>
-           </property>
-           <property name="autoDefault">
-            <bool>true</bool>
-           </property>
-          </widget>
-         </item>
-         <item row="10" column="2">
-          <widget class="QPushButton" name="end_turn_button_">
-           <property name="styleSheet">
-            <string notr="true">color: rgb(159, 159, 0);</string>
-           </property>
-           <property name="text">
-            <string>Закончить ход</string>
-           </property>
-           <property name="autoDefault">
-            <bool>true</bool>
-           </property>
-          </widget>
-         </item>
-         <item row="10" column="3">
-          <spacer name="horizontalSpacer_4">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Fixed</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>50</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item row="10" column="1">
-          <spacer name="horizontalSpacer_3">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Fixed</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>50</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item row="11" column="1">
-          <spacer name="horizontalSpacer_5">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Fixed</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>50</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item row="6" column="1" colspan="3">
-          <widget class="QLabel" name="label">
-           <property name="text">
-            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt; font-weight:600; color:#d1d100;&quot;&gt;Эффекты:&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-           </property>
-          </widget>
-         </item>
-         <item row="11" column="3">
-          <spacer name="horizontalSpacer">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item row="0" column="0">
-          <widget class="QWidget" name="border_upleft_" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-topleft.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="1" colspan="3">
-          <widget class="QWidget" name="border_up_" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>5</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>16777215</width>
-             <height>5</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-top.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="0" rowspan="11">
-          <widget class="QWidget" name="border_left_" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>5</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>5</width>
-             <height>16777215</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-left.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="4">
-          <widget class="QWidget" name="border_upright_" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-topright.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="7" column="1" colspan="3">
-          <widget class="QFrame" name="effects_frame_">
-           <property name="minimumSize">
-            <size>
-             <width>32</width>
-             <height>36</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>16777215</width>
-             <height>36</height>
-            </size>
-           </property>
-           <property name="frameShape">
-            <enum>QFrame::StyledPanel</enum>
-           </property>
-           <property name="frameShadow">
-            <enum>QFrame::Raised</enum>
-           </property>
-           <layout class="QGridLayout" name="gridLayout_7">
-            <property name="leftMargin">
-             <number>3</number>
-            </property>
-            <property name="topMargin">
-             <number>3</number>
-            </property>
-            <property name="rightMargin">
-             <number>0</number>
-            </property>
-            <property name="bottomMargin">
-             <number>0</number>
-            </property>
-            <property name="spacing">
-             <number>3</number>
-            </property>
-            <item row="0" column="7" rowspan="2">
-             <widget class="QWidget" name="effect_8_" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="11">
-             <widget class="QWidget" name="effect_12_" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="8" rowspan="2">
-             <widget class="QWidget" name="effect_9_" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="10" rowspan="2">
-             <widget class="QWidget" name="effect_11_" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="9" rowspan="2">
-             <widget class="QWidget" name="effect_10_" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="0" rowspan="2">
-             <widget class="QWidget" name="effect_13_" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="1" rowspan="2">
-             <widget class="QWidget" name="effect_14_" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="2" rowspan="2">
-             <widget class="QWidget" name="effect_15_" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="3" rowspan="2">
-             <widget class="QWidget" name="effect_16_" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="4" rowspan="2">
-             <widget class="QWidget" name="effect_17" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="5" rowspan="2">
-             <widget class="QWidget" name="effect_6_" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="6" rowspan="2">
-             <widget class="QWidget" name="effect_7_" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="10">
-             <widget class="QWidget" name="widget_22" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="11">
-             <widget class="QWidget" name="widget_21" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="9">
-             <widget class="QWidget" name="widget_23" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="8">
-             <widget class="QWidget" name="widget_24" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="7">
-             <widget class="QWidget" name="widget_25" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="6">
-             <widget class="QWidget" name="widget_26" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="5">
-             <widget class="QWidget" name="widget_27" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="4">
-             <widget class="QWidget" name="widget_28" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="3">
-             <widget class="QWidget" name="widget_29" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="2">
-             <widget class="QWidget" name="widget_30" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="1">
-             <widget class="QWidget" name="widget_31" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="0">
-             <widget class="QWidget" name="widget_32" native="true">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="minimumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>16</width>
-                <height>16</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/standart_effect.png);</string>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </widget>
-         </item>
-         <item row="12" column="4">
-          <widget class="QWidget" name="border_botright_" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-botright.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="4" column="1" colspan="3">
-          <widget class="QWidget" name="action_buttons" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>0</width>
-             <height>60</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>16777215</width>
-             <height>60</height>
-            </size>
-           </property>
-           <layout class="QGridLayout" name="gridLayout_5">
-            <property name="topMargin">
-             <number>0</number>
-            </property>
-            <property name="rightMargin">
-             <number>0</number>
-            </property>
-            <property name="bottomMargin">
-             <number>0</number>
-            </property>
-            <property name="spacing">
-             <number>0</number>
-            </property>
-            <item row="0" column="0">
-             <widget class="QPushButton" name="pushButton">
-              <property name="minimumSize">
-               <size>
-                <width>60</width>
-                <height>60</height>
-               </size>
-              </property>
-              <property name="maximumSize">
-               <size>
-                <width>60</width>
-                <height>60</height>
-               </size>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">background-image: url(:/assets/hotseatpvp/scroll_red.png);</string>
-              </property>
-              <property name="text">
-               <string/>
-              </property>
-              <property name="autoDefault">
-               <bool>false</bool>
-              </property>
-              <property name="flat">
-               <bool>false</bool>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </widget>
-         </item>
-         <item row="1" column="4" rowspan="11">
-          <widget class="QWidget" name="border_right_" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>8</width>
-             <height>16777215</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-right.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="12" column="1" colspan="3">
-          <widget class="QWidget" name="border_bottom_" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>16777215</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-bottom.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="12" column="0">
-          <widget class="QWidget" name="border_botleft_" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-botleft.png)</string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </widget>
-      </item>
-      <item row="2" column="0" colspan="2">
-       <widget class="QWidget" name="helper" native="true">
-        <property name="minimumSize">
-         <size>
-          <width>0</width>
-          <height>75</height>
-         </size>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>16777215</width>
-          <height>75</height>
-         </size>
-        </property>
-        <layout class="QGridLayout" name="gridLayout_2">
-         <property name="spacing">
-          <number>0</number>
-         </property>
-         <item row="0" column="2">
-          <widget class="QWidget" name="border_upright_1" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-topright.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="1">
-          <widget class="QWidget" name="border_bottom_1" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>16777215</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-bottom.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="0">
-          <widget class="QWidget" name="border_upleft_1" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-topleft.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="0">
-          <widget class="QWidget" name="border_left_1" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>5</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>5</width>
-             <height>16777215</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-left.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="2">
-          <widget class="QWidget" name="border_right_1" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>8</width>
-             <height>16777215</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-right.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="1">
-          <widget class="QWidget" name="border_up_1" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>5</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>16777215</width>
-             <height>5</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-top.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="0">
-          <widget class="QWidget" name="border_botleft_1" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-botleft.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="1">
-          <widget class="QWidget" name="container_" native="true">
-           <layout class="QGridLayout" name="gridLayout_3">
-            <property name="leftMargin">
-             <number>0</number>
-            </property>
-            <property name="topMargin">
-             <number>0</number>
-            </property>
-            <property name="rightMargin">
-             <number>0</number>
-            </property>
-            <property name="bottomMargin">
-             <number>0</number>
-            </property>
-            <property name="spacing">
-             <number>0</number>
-            </property>
-            <item row="0" column="0">
-             <widget class="QLabel" name="label_2">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="text">
-               <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt; color:#ffffff;&quot;&gt;Это подсказка. Она подсказывает, что можно сделать. А может и нет.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </widget>
-         </item>
-         <item row="2" column="2">
-          <widget class="QWidget" name="border_botright_1" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>8</width>
-             <height>8</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/opaque-border-botright.png)</string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </widget>
-      </item>
-      <item row="1" column="0">
-       <spacer name="verticalSpacer_3">
-        <property name="orientation">
-         <enum>Qt::Vertical</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>20</width>
-          <height>40</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item row="0" column="1" rowspan="2">
-       <widget class="QWidget" name="game_widget_" native="true">
-        <property name="minimumSize">
-         <size>
-          <width>0</width>
-          <height>0</height>
-         </size>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>16777215</width>
-          <height>16777215</height>
-         </size>
-        </property>
-        <property name="sizeIncrement">
-         <size>
-          <width>1</width>
-          <height>1</height>
-         </size>
-        </property>
-        <property name="baseSize">
-         <size>
-          <width>1</width>
-          <height>1</height>
-         </size>
-        </property>
-        <layout class="QGridLayout" name="gridLayout_6">
-         <property name="leftMargin">
-          <number>0</number>
-         </property>
-         <property name="topMargin">
-          <number>0</number>
-         </property>
-         <property name="rightMargin">
-          <number>0</number>
-         </property>
-         <property name="bottomMargin">
-          <number>0</number>
-         </property>
-         <property name="spacing">
-          <number>0</number>
-         </property>
-         <item row="0" column="0">
-          <widget class="QWidget" name="border_upleft_2" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>26</width>
-             <height>25</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>26</width>
-             <height>25</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/strong_translucent-border-topleft.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="1">
-          <widget class="QWidget" name="border_up_2" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>25</width>
-             <height>25</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>16777215</width>
-             <height>25</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/strong_translucent-border-top.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="2">
-          <widget class="QWidget" name="border_upright_2" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>25</width>
-             <height>25</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>25</width>
-             <height>25</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/strong_translucent-border-topright.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="0">
-          <widget class="QWidget" name="border_left_2" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>26</width>
-             <height>26</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>26</width>
-             <height>16777215</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/strong_translucent-border-left.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="2">
-          <widget class="QWidget" name="border_right_2" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>25</width>
-             <height>25</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>26</width>
-             <height>16777215</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/strong_translucent-border-right.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="0">
-          <widget class="QWidget" name="border_botleft_2" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>26</width>
-             <height>26</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>26</width>
-             <height>26</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/strong_translucent-border-botleft.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="1">
-          <widget class="QWidget" name="border_bottom_2" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>26</width>
-             <height>26</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>16777215</width>
-             <height>26</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/strong_translucent-border_bottom.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="2">
-          <widget class="QWidget" name="border_botright_2" native="true">
-           <property name="minimumSize">
-            <size>
-             <width>25</width>
-             <height>26</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>25</width>
-             <height>26</height>
-            </size>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">background:url(:/assets/window/strong_translucent-border-botright.png)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="1">
-          <widget class="QWidget" name="game_widget_1" native="true">
-           <property name="styleSheet">
-            <string notr="true">background-image: url(:/assets/window/strong_translucent-background.png);</string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>

+ 0 - 91
include/player.h

@@ -1,91 +0,0 @@
-#ifndef INCLUDEPLAYER_H
-#define INCLUDEPLAYER_H
-
-#include "units/Unit.h"
-#include "RaceManager.h"
-
-#include <QObject>
-#include <QDebug>
-
-#include <set>
-
-class Race;
-
-template<class Obj, class Identifier>
-class ObjectFactory;
-
-class Player {
-    struct unit_comparator {
-        bool operator() (const Unit* lhs, const Unit* rhs) const {
-            if (rhs == nullptr)
-                return true;
-            if (lhs->getUnitBaseClassId() != rhs->getUnitBaseClassId())
-                return lhs->getUnitBaseClassId() < rhs->getUnitBaseClassId();
-            return lhs->getUnitId() < rhs->getUnitId();
-        }
-    };
-
-public:
-    Player() {
-        init(1);
-    }
-
-    void init(int id) {
-        player_name_ = "Игрок " + QString::number(id + 1);
-        race_ = RaceManager::getInstance().getRace(
-                    RaceManager::getInstance().getAvailableRacesList()[0]
-                );
-        units_.clear();
-    }
-
-    QString getPlayerName() {
-        return player_name_;
-    }
-
-    const std::multiset<Unit*, unit_comparator>& getUnits() {
-        return units_;
-    }
-
-    std::vector<Unit*> getUnitsAsVector() {
-        std::vector<Unit*> result;
-        for (auto unit: units_)
-            result.push_back(unit);
-        return result;
-    }
-
-    void addUnit(Unit *a) {
-        if (units_.size() >= 10)
-            return;
-        units_.insert(a);
-    }
-
-    void deleteUnit(Unit *a) {
-        qDebug() << "deleting unit " << a->getUnitName();
-        auto unit = units_.find(a);
-        if (unit != units_.end())
-            units_.erase(unit);
-    }
-
-    void clearUnits() {
-        units_.clear();
-    }
-
-    Race* getRace() {
-        return race_;
-    }
-
-    void setRace(Race* race) {
-        race_ = race;
-    }
-
-signals:
-
-public slots:
-
-private:
-    QString player_name_;
-    std::multiset<Unit*, unit_comparator> units_;
-    Race* race_;
-};
-
-#endif // INCLUDEPLAYER_H

+ 0 - 33
include/playermanager.h

@@ -1,33 +0,0 @@
-#ifndef INCLUDEPLAYERMANAGER_H
-#define INCLUDEPLAYERMANAGER_H
-
-#include <Player.h>
-
-#include <QObject>
-
-#include <vector>
-
-class PlayerManager : public QObject
-{
-    Q_OBJECT
-private:
-    explicit PlayerManager(QObject *parent = nullptr);
-public:
-    static PlayerManager& getInstance() {
-        static PlayerManager instance;
-        return instance;
-    }
-
-    Player* getPlayer(int id);
-    int getPlayersNum();
-    void setPlayersNum(int num);
-
-private:
-    std::vector<Player> players_;
-
-signals:
-
-public slots:
-};
-
-#endif // INCLUDEPLAYERMANAGER_H

+ 0 - 44
include/race.h

@@ -1,44 +0,0 @@
-#ifndef INCLUDEACE_H
-#define INCLUDEACE_H
-
-#include <QObject>
-#include <QString>
-#include <QImage>
-
-#include <vector>
-
-#include "AbstractFactory.h"
-
-class Unit;
-
-class Race : public QObject
-{
-    Q_OBJECT
-public:
-    explicit Race(QString race_name, QObject *parent = nullptr);
-
-    Unit* createUnit(QString unit_name);
-
-    const std::vector<QString> &getAvailableUnitsList();
-    const std::vector<Unit*> &getAllUnitsList();
-
-    QString getRaceId();
-    QString getRaceName();
-    QImage getRaceIcon();
-    QString getRaceDescr();
-
-private:
-    QString race_id_;
-    QString race_name_;
-    QImage race_icon_;
-    QString race_descr_;
-    ObjectFactory<Unit, QString> units_factory_;
-    std::vector<QString> available_units_list_;
-    std::vector<Unit*> all_units_list_;
-
-signals:
-
-public slots:
-};
-
-#endif // INCLUDEACE_H

+ 0 - 33
include/racemanager.h

@@ -1,33 +0,0 @@
-#ifndef INCLUDEACEMANAGER_H
-#define INCLUDEACEMANAGER_H
-
-#include <QObject>
-
-#include <vector>
-
-class Race;
-
-class RaceManager : public QObject
-{
-    Q_OBJECT
-private:
-    explicit RaceManager(QObject *parent = nullptr);
-public:
-    static RaceManager& getInstance() {
-        static RaceManager instance;
-        return instance;
-    }
-
-    Race* getRace(QString race_name);
-    const std::vector<QString>& getAvailableRacesList();
-
-private:
-    std::vector<QString> available_races_;
-    std::map<QString, Race*> races_;
-
-signals:
-
-public slots:
-};
-
-#endif // INCLUDEACEMANAGER_H

+ 0 - 15
include/skills/melledamage.h

@@ -1,15 +0,0 @@
-//
-// Created by IgorBat on 23.04.2018.
-//
-
-#ifndef GAME_CLIENT_MELLEDAMAGE_H
-#define GAME_CLIENT_MELLEDAMAGE_H
-#pragma once
-#include <cassert>
-#include "skills\spell.h"
-
-class melledamage : public Effect {
-    void CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom);
-};
-
-#endif //GAME_CLIENT_MELLEDAMAGE_H

+ 0 - 16
include/skills/selfheal.h

@@ -1,16 +0,0 @@
-//
-// Created by IgorBat on 23.04.2018.
-//
-
-#ifndef GAME_CLIENT_SELFHEAL_H
-#define GAME_CLIENT_SELFHEAL_H
-#pragma once
-#include <cassert>
-#include "skills\spell.h"
-
-class selfheal : public Spell {
-    void CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom);
-
-};
-
-#endif //GAME_CLIENT_SELFHEAL_H

+ 0 - 68
include/skills/spell.h

@@ -1,68 +0,0 @@
-//
-// Created by IgorBat on 17.03.2018.
-//
-
-#ifndef THE_GAME_SPELL_H
-#define THE_GAME_SPELL_H
-
-#pragma once
-#include <iostream>
-#include <vector>
-#include <list>
-//#include "AbstractFactory.h"
-#include "effect.h"
-
-class Unit{
-    std :: list <Effect> effectsOnUnit;
-};
-class Cell{
-    std :: list <Effect> effectsOnCell;
-};
-class Spell : public QObject {
-    Q_OBJECT
-
-protected:
-    std :: list <Effect> effects_;
-private:
-    int distance_;
-    bool forCell_;
-public:
-    explicit Spell(QString parameters);
-
-    virtual ~Spell() {}
-
-    int getDistance();
-    void setDistance(int value);
-
-    bool getForCell();
-    void setForCell(bool value);
-
-    virtual bool canCastToCell(Cell* destination, Cell* from);
-
-    virtual void CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom) = 0;
-
-    int getDistance();
-    void setDistance(int Value);
-
-    bool getForCell();
-    void setForCell(bool Value);
-
-    QString getSpellName() const;
-    QString getSpellDescr() const;
-    QImage getSpellIcon() const;
-
-    //---------------------------------------------//
-    //-----------Parameters load section-----------//
-    //---------------------------------------------//
-
-private:
-    void loadSpellTraits(QString spell_folder);
-    void loadSpellDescr(QString spell_folder);
-    void loadSpellIcon(QString spell_folder);
-
-    // GUI values
-    QString spell_name_;
-    QString spell_descr_;
-    QImage spell_icon_;
-};
-#endif //THE_GAME_SPELL_H

+ 0 - 14
include/units/mage.h

@@ -1,14 +0,0 @@
-#ifndef UNITS_MAGE_H
-#define UNITS_MAGE_H
-
-#include "units/Unit.h"
-
-#include <QObject>
-
-class Mage : public Unit
-{
-public:
-    explicit Mage(QString parameters);
-};
-
-#endif // UNITS_MAGE_H

+ 0 - 16
include/units/warrior.h

@@ -1,16 +0,0 @@
-#ifndef UNITS_WARRIOR_H
-#define UNITS_WARRIOR_H
-
-#include "units/Unit.h"
-
-#include <QObject>
-#include <QString>
-
-class Warrior : public Unit
-{
-public:
-    explicit Warrior(QString parameters);
-    int reduceIncomingDamage(std::string damageType, int damage) override;
-};
-
-#endif // UNITS_WARRIOR_H

+ 0 - 19
source/effects/melledamage.cpp

@@ -1,19 +0,0 @@
-//
-// Created by IgorBat on 23.04.2018.
-//
-
-#pragma once
-#include <cassert>
-#include "effect\melledamage.h"
-#include "units\unit.h"
-#include <string>
-
-void melledamage::OperateOnCell(Cell* cell){
-    throw std :: string("CAN'T TOUCH THIS")
-}
-
-void melledamage::OperateOnUnit(Unit* unit){
-    int temp = unit -> reduceIncomingDamage("p", count_);
-    unit ->setHealthPoints(unit -> getHealthPoints() - temp);
-    //check_on_death
-}

+ 0 - 19
source/effects/selfheal.cpp

@@ -1,19 +0,0 @@
-//
-// Created by IgorBat on 23.04.2018.
-//
-
-
-#pragma once
-#include <cassert>
-#include "effect\selfdamage.h"
-#include "units\unit.h"
-#include <string>
-
-void melledamage::OperateOnCell(Cell* cell){
-    throw std :: string("CAN'T TOUCH THIS")
-}
-
-void melledamage::OperateOnUnit(Unit* unit){
-    unit.setHealthPoints(unit.getHealthPoints() + count_);
-    //check_on_death
-}

+ 0 - 91
source/gui/guiscenemanager.cpp

@@ -1,91 +0,0 @@
-#include "gui/GuiSceneManager.h"
-#include "gui/GUI.h"
-#include "gui/MainMenu.h"
-
-#include "hotseatgame/gui/RecruitmentScene.h"
-#include "hotseatgame/gui/PlayerVsPlayerIntro.h"
-#include "hotseatgame/gui/PreBattleScene.h"
-#include "hotseatgame/gui/HotSeatGame.h"
-
-#include <QResource>
-#include <QApplication>
-#include <QFontDatabase>
-
-GuiSceneManager::GuiSceneManager(QObject *parent) : QObject(parent) {
-    gui_ = new GUI();
-    gui_->show();
-    current_scene_ = "none";
-
-    QResource::registerResource(QApplication::applicationDirPath() + "/res/gui_data.gtr");
-    QResource::registerResource(QApplication::applicationDirPath() + "/res/unit_data.gtr");
-    QResource::registerResource(QApplication::applicationDirPath() + "/res/spell_data.gtr");
-    QResource::registerResource(QApplication::applicationDirPath() + "/res/effect_data.gtr");
-
-    QFontDatabase::addApplicationFont(":/../assets/fonts/barocco-initial.ttf");
-    QFontDatabase::addApplicationFont(":/../assets/fonts/viking-cyr.ttf");
-
-    registerScene("main_menu", new MainMenu(gui_->mainContentScene()));
-    registerScene("pvp_intro", new PlayerVsPlayerIntro(gui_->mainContentScene()));
-    registerScene("recruit_army", new RecruitmentScene(gui_->mainContentScene()));
-    registerScene("prebattle", new PreBattleScene(gui_->mainContentScene()));
-    registerScene("hotseatgame", new HotSeatGame());
-
-    changeScene("main_menu");
-}
-
-GuiSceneManager::~GuiSceneManager() {}
-
-
-bool GuiSceneManager::registerScene(QString scene_name, Scene* scene) {
-    if (scene_name == "none")
-        return false;
-
-    if (scenes_.count(scene_name) != 0) {
-        delete scene;
-        return false;
-    }
-
-    scenes_[scene_name] = scene;
-    return true;
-}
-
-bool GuiSceneManager::changeScene(QString scene_name, QString args) {
-    if (scene_name == "main_window") {
-        return false;
-    }
-
-    if (current_scene_ != "none")
-        scenes_[current_scene_]->hide();
-
-    scenes_[scene_name]->parseArgs(args);
-    scenes_[scene_name]->init();
-    scenes_[scene_name]->show();
-    current_scene_ = scene_name;
-    return true;
-}
-
-bool GuiSceneManager::hideMainWindow() {
-    gui_->hide();
-    return true;
-}
-
-bool GuiSceneManager::showMainWindow() {
-    gui_->show();
-    return true;
-}
-
-bool GuiSceneManager::hideDetachedScene(QString scene_name) {
-    if (scenes_.count(scene_name) == 0 || !scenes_[scene_name])
-        return false;
-    scenes_[scene_name]->hide();
-    return true;
-}
-
-bool GuiSceneManager::showDetachedScene(QString scene_name, QString args) {
-    if (scenes_.count(scene_name) == 0 || !scenes_[scene_name])
-        return false;
-    scenes_[scene_name]->parseArgs(args);
-    scenes_[scene_name]->init();
-    scenes_[scene_name]->show();
-    return true;
-}

+ 0 - 6
source/gui/scene.cpp

@@ -1,6 +0,0 @@
-#include "gui/Scene.h"
-
-Scene::Scene(QWidget *parent) : QWidget(parent)
-{
-
-}

+ 0 - 7
source/skills/melledamage.cpp

@@ -1,7 +0,0 @@
-//
-// Created by IgorBat on 23.04.2018.
-//
-
-void melledamage::CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom){
-    effects_[0] -> OperateOnUnit(whom);
-}

+ 0 - 7
source/skills/selfheal.cpp

@@ -1,7 +0,0 @@
-//
-// Created by IgorBat on 23.04.2018.
-//
-
-void selfheal::CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom){
-    effects_[0] -> OperateOnUnit(who);
-}

+ 0 - 75
source/skills/spell.cpp

@@ -1,75 +0,0 @@
-//
-// Created by IgorBat on 21.04.2018.
-//
-
-#include "abstractfactory.h"
-#include "skills/spell.h"
-
-#include <iostream>
-#include <algorithm>
-#include <cassert>
-#include <string>
-
-#include <QFile>
-#include <QString>
-#include <QTextStream>
-
-Spell::Spell(QString parameters) {
-    QStringList params = parameters.split("\n");
-    assert(params.size() >= 1);
-    spell_name_ = param[0];
-    QString spell_folder = ":/assets/skills/" + spell_name_ + "/";
-
-    loadSpellDescr(spell_folder);
-    loadSpellIcon(spell_folder);
-    loadSpellTraits(spell_folder);
-}
-
-void Spell::loadSpellDescr(QString spell_folder) {
-    QFile file(spell_folder + "descr.txt");
-    file.open(QIODevice::ReadOnly);
-    QTextStream in(&file);
-    in.setCodec("UTF-8");
-    spell_descr_ = in.readAll();
-}
-
-void Spell::loadSpellIcon(QString spell_folder) {
-    spell_icon_.load(spell_folder + "icon.png");
-}
-
-void Spell::loadSpellTraits(QString spell_folder) {
-    /*
-     * you can do it by yourself, i need to sleep
-     */
-
-}
-
-QString Spell::getSpellName() const {
-    return spell_name_;
-}
-
-QString Spell::getSpellDescr() const {
-    return spell_descr_;
-}
-
-QImage Spell::getSpellIcon() const {
-    return spell_icon_;
-}
-
-int Spell::getDistance(){
-    return distance_;
-}
-void setDistance(int value){
-    distance_ = value;
-}
-
-bool getForCell(){
-    return forCell_;
-}
-void setForCell(bool value){
-    forCell_ = value;
-}
-bool Spell::canCastToCell(Cell* destination, Cell* from){
-    if(from -> lenOfActualPath(destination) == 1) return true;
-    return false;
-}

+ 0 - 7
source/units/mage.cpp

@@ -1,7 +0,0 @@
-#include "units/Mage.h"
-#include "units/Unit.h"
-
-Mage::Mage(QString parameters) : Unit(parameters)
-{
-
-}

+ 0 - 320
source/units/unit.cpp

@@ -1,320 +0,0 @@
-#include "AbstractFactory.h"
-#include "units/Unit.h"
-#include "Cell.h"
-#include "effects/effect.h"
-
-#include <iostream>
-#include <algorithm>
-#include <cassert>
-#include <string>
-
-#include <QFile>
-#include <QString>
-#include <QTextStream>
-
-Unit::Unit(QString parameters) {
-    QStringList params = parameters.split("|");
-
-    assert(params.size() >= 2);
-
-    race_id_ = params[0];
-    unit_id_ = params[1];
-
-    QString unit_folder = ":/assets/units/" + race_id_ + "/" + unit_id_ + "/";
-
-    loadUnitName(unit_folder);
-    loadUnitDescr(unit_folder);
-    loadUnitBaseClass(unit_folder);
-    loadUnitTraits(unit_folder);
-    loadUnitIcon(unit_folder);
-    loadUnitPrevSpecs(unit_folder);
-    loadUnitUpgradeSpecs(unit_folder);
-}
-
-void Unit::loadUnitName(QString unit_folder) {
-    QFile file(unit_folder + "unitname.txt");
-    file.open(QIODevice::ReadOnly);
-    QTextStream in(&file);
-    in.setCodec("UTF-8");
-    unit_name_ = in.readLine();
-}
-
-void Unit::loadUnitDescr(QString unit_folder) {
-    QFile file(unit_folder + "descr.txt");
-    file.open(QIODevice::ReadOnly);
-    QTextStream in(&file);
-    in.setCodec("UTF-8");
-    unit_descr_ = in.readAll();
-}
-
-void Unit::loadUnitBaseClass(QString unit_folder) {
-    QFile file(unit_folder + "baseclass.txt");
-    file.open(QIODevice::ReadOnly);
-    QTextStream in(&file);
-    in.setCodec("UTF-8");
-    base_class_id_ = in.readLine();
-}
-
-void Unit::loadUnitTraits(QString unit_folder) {
-   // TO BE DONE!!!
-    health_points_ = rand();
-    activity_points_ = rand();
-    attack_cost_ = rand();
-    attack_range_ = rand();
-}
-
-void Unit::loadUnitIcon(QString unit_folder) {
-    unit_icon_.load(unit_folder + "icon.png");
-}
-
-void Unit::loadUnitPrevSpecs(QString unit_folder) {
-    QFile file(unit_folder + "prevgrades.txt");
-    file.open(QIODevice::ReadOnly);
-    QTextStream in(&file);
-    in.setCodec("UTF-8");
-    QString line = in.readLine();
-    while (!in.atEnd()) {
-        parent_specs_.push_back(line);
-        line = in.readLine();
-    }
-    parent_specs_.push_back(line);
-    line = in.readLine();
-
-}
-
-void Unit::loadUnitUpgradeSpecs(QString unit_folder) {
-    QFile file(unit_folder + "nextgrades.txt");
-    file.open(QIODevice::ReadOnly);
-    QTextStream in(&file);
-    in.setCodec("UTF-8");
-    QString line = in.readLine();
-    while (!in.atEnd()) {
-        upgrade_specs_.push_back(line);
-        line = in.readLine();
-    }
-    upgrade_specs_.push_back(line);
-    line = in.readLine();
-}
-
-int Unit::getCost(){
-	return cost_;
-}
-
-std::vector<QString> Unit::getParentSpecs(){
-    return parent_specs_;
-}
-
-std::vector<QString> Unit::getUpgradeSpecs(){
-	return upgrade_specs_;
-}
-
-double Unit::getExperience() {
-	return experience_;
-}
-
-int Unit::getLevel() {
-	return level_;
-}
-
-int Unit::getHealthPoints() {
-	return health_points_;
-}
-
-int Unit::getAttackRange() {
-	return attack_range_;
-}
-
-int Unit::getActivityPoints(){
-	return activity_points_;
-}
-
-int Unit::getStartingActivityPoints() {
-	return starting_activity_points_;
-}
-
-Cell* Unit::getLocation() {
-	return location_;
-}
-
-void Unit::setLocation(Cell* to) {
-	location_ = to;
-}
-
-int Unit::getMovementSpeed() {
-	return movement_speed_;
-}
-
-int Unit::getAttackCost(){
-	return attack_cost_;
-}
-
-int Unit::getInitiative() {
-	return initiative_;
-}
-
-int Unit::getIntelligence() {
-	return intelligence_;
-}
-
-int Unit::getStrength() {
-	return strength_;
-}
-
-int Unit::getAgility() {
-	return agility_;
-}
-
-int Unit::getAttackPoints(){
-	return attack_cost_;
-}
-
-int Unit::getMagicDefence() {
-	return magic_defence_;
-}
-
-int Unit::getPhysicDefence() {
-	return physic_defence_;
-}
-
-double Unit::getRealX() {
-	return real_x_;
-}
-
-void Unit::setRealX(double x) {
-	real_x_ = x;
-}
-
-double Unit::getRealY() {
-	return real_y_;
-}
-
-void Unit::setRealY(double y) {
-	real_y_ = y;
-}
-
-bool Unit::isCharacter(){
-    return true;
-}
-
-int Unit::theSameNear(){
-    short near_qnt = 0;
-    if (this->location_->getleftUp()->getCharacter()->base_class_id_ == this->base_class_id_){
-        near_qnt++;
-    }
-    if (this->location_->getleft()->getCharacter()->base_class_id_ == this->base_class_id_){
-        near_qnt++;
-    }
-    if (this->location_->getleftDown()->getCharacter()->base_class_id_ == this->base_class_id_){
-        near_qnt++;
-    }
-    if (this->location_->getrightUp()->getCharacter()->base_class_id_ == this->base_class_id_){
-        near_qnt++;
-    }
-    if (this->location_->getright()->getCharacter()->base_class_id_ == this->base_class_id_){
-        near_qnt++;
-    }
-    if (this->location_->getrightDown()->getCharacter()->base_class_id_ == this->base_class_id_){
-        near_qnt++;
-    }
-
-    return near_qnt;
-}
-
-int Unit::reduceIncomingDamage(std::string damageType, int damage) { //returns damage after reducing by defence
-	assert("Incorrect damage type in call reduceIncomingDamage(), expected" &&
-        (damageType[0] == 'p' || damageType[0] == 'P' || damageType[0] == 'm' || damageType[0] == 'M'));
-	assert("Magic defence of unit is incorrectly high (>40), but must be" && magic_defence_ <= 40);
-	assert("Physic defence of unit is incorrectly high (>40), but must be" && physic_defence_ <= 40);
-	if (damageType[0] == 'p' || damageType[0] == 'P') {
-        return (damage - 2.5 * double(damage) * double(physic_defence_) / 100.0);
-	}
-	else if (damageType[0] == 'm' || damageType[0] == 'M') {
-        return (damage - 2.5 * double(damage) * double(magic_defence_) / 100.0);
-	}
-    return damage;
-}
-
-int Unit::lenOfActualPath(Cell* destination) {
-    return getLocation()->actualPath(destination).size() - 1;
-}
-
-bool Unit::canMoveForDistance(int distance) {
-	return (activity_points_ * movement_speed_ >= distance);
-}
-
-bool Unit::canMoveToCell(Cell* destination) {
-	return (destination->isEmpty() && lenOfActualPath(destination) > 0 && canMoveForDistance(lenOfActualPath(destination)));
-}	
-
-void Unit::moveToCell(Cell* destination) {
-	if (!canMoveToCell(destination))
-		return;	//here could be a gui-message about failed move (x-mark, for example)
-	else {
-        activity_points_ -= lenOfActualPath(destination)/movement_speed_;
-        if (lenOfActualPath(destination) % movement_speed_)
-            activity_points_ -= 1;
-		setLocation(destination);
-	}
-}
-
-QString Unit::getUnitId() const {
-    return unit_id_;
-}
-
-QString Unit::getUnitName() const {
-    return unit_name_;
-}
-
-QString Unit::getUnitDescr() const {
-    return unit_descr_;
-}
-
-QString Unit::getUnitBaseClassId() const {
-    return base_class_id_;
-}
-
-std::vector<QString> Unit::getUnitTraits() const {
-    return {
-            QString::number(health_points_),
-            QString::number(attack_range_),
-            QString::number(activity_points_),
-            QString::number(initiative_)
-    };
-}
-
-QImage Unit::getUnitIcon() const {
-    return unit_icon_;
-}
-
-void Unit::operateEffectList(){
-    for(std::vector<Effect*>::iterator it = beginIteratorEffectsList();
-            it != endIteratorEffectsList(); ++it){
-        (*it)->OperateOnUnit(this);
-    }
-}
-void Unit::add(Effect* effect){
-    if(effect == nullptr)
-        throw new std::string("Try to add undefined effect to unit");
-    effects_.push_back(effect);
-}
-void Unit::remove(std::vector<Effect*>::iterator it){
-    if(beginIteratorEffectsList() <= it && it < endIteratorEffectsList()){
-        effects_.erase(it);
-    }
-}
-void Unit::remove(Effect* effect){
-    for(std::vector<Effect*>::iterator it = beginIteratorEffectsList();
-            it != endIteratorEffectsList(); ++it){
-        if((*it) == effect){
-            remove(it);
-            return;
-        }
-    }
-}
-std::vector<Effect*>::iterator Unit::beginIteratorEffectsList(){
-    return effects_.begin();
-}
-std::vector<Effect*>::iterator Unit::endIteratorEffectsList(){
-    return effects_.end();
-}
-

+ 0 - 49
source/units/warrior.cpp

@@ -1,49 +0,0 @@
-#include "units/Warrior.h"
-#include "units/Unit.h"
-#include <cassert>
-
-Warrior::Warrior(QString parameters) : Unit(parameters)
-{
-
-}
-
-int Warrior::reduceIncomingDamage(std::string damageType, int damage) { //returns damage after reducing by defence
-    assert("Incorrect damage type in call reduceIncomingDamage(), expected" &&
-        (damageType[0] == 'p' || damageType[0] == 'P' || damageType[0] == 'm' || damageType[0] == 'M'));
-    assert("Magic defence of unit is incorrectly high (>40), but must be" && magic_defence_ <= 40);
-    assert("Physic defence of unit is incorrectly high (>40), but must be" && physic_defence_ <= 40);
-    int near_same = this->theSameNear();
-
-
-    int active_defence;
-    if (damageType[0] == 'p' || damageType[0] == 'P') {
-        active_defence = physic_defence_;
-    }
-    else if (damageType[0] == 'm' || damageType[0] == 'M') {
-        active_defence = magic_defence_;
-    } else {
-        // THIS PART SHOULD BE UNREACHABLE
-        active_defence = physic_defence_;
-    }
-
-    //return (damage - 2.5 * damage * active_defence / 100);
-    int reduced_damage;
-    switch (near_same) {
-    case 0:
-        reduced_damage = damage - 2.5 * double(damage) * double(active_defence) / 100.0;
-        break;
-    case 1:
-        reduced_damage = damage - 2.9 * double(damage) * double(active_defence) / 100.0;
-        break;
-    case 2:
-        reduced_damage = damage - 3.3 * double(damage) * double(active_defence) / 100.0;
-        break;
-    case 3:
-        reduced_damage = damage - 3.7 * double(damage) * double(active_defence) / 100.0;
-        break;
-    default:
-        reduced_damage = damage - 4.1 * double(damage) * double(active_defence) / 100.0;
-        break;
-    }
-    return reduced_damage;
-}