diff --git a/NineChess/ninechess.pro b/NineChess/ninechess.pro index 838c5f5c..bacd4dd6 100644 --- a/NineChess/ninechess.pro +++ b/NineChess/ninechess.pro @@ -1,81 +1,80 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2015-11-03T22:30:34 -# -#------------------------------------------------- - -QT += core gui \ - multimedia - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -TARGET = NineChess -TEMPLATE = app - -CONFIG += warn_off - -INCLUDEPATH += src -INCLUDEPATH += include - -SOURCES += \ - src/client.cpp \ - src/main.cpp \ - src/boarditem.cpp \ - src/gamecontroller.cpp \ - src/gamescene.cpp \ - src/gameview.cpp \ - src/ninechess.cpp \ - src/ninechessai_ab.cpp \ - src/ninechesswindow.cpp \ - src/pieceitem.cpp \ - src/aithread.cpp \ - src/server.cpp - -HEADERS += \ - include/config.h \ - include/version.h \ - include/version.h.template \ - src/HashNode.h \ - src/MemoryPool.h \ - src/MemoryPool.tcc \ - src/StackAlloc.h \ - src/boarditem.h \ - src/client.h \ - src/gamecontroller.h \ - src/gamescene.h \ - src/gameview.h \ - src/graphicsconst.h \ - src/hashMap.h \ - src/ninechess.h \ - src/ninechessai_ab.h \ - src/ninechesswindow.h \ - src/pieceitem.h \ - src/manuallistview.h \ - src/aithread.h \ - src/server.h \ - src/zobrist.h - -FORMS += \ - ninechesswindow.ui - -RESOURCES += \ - ninechesswindow.qrc - -DISTFILES += \ - NineChess.rc \ - ../Readme.md \ - ../Sample.txt \ - ../History.txt \ - ../Licence.txt \ - version.sh - -RC_FILE += NineChess.rc - -# With C++17 support -greaterThan(QT_MAJOR_VERSION, 4) { -CONFIG += c++17 -#QMAKE_CXXFLAGS += -O0 -g3 -fsanitize=leak -fno-omit-frame-pointer -#QMAKE_LFLAGS += -fsanitize=leak -} else { -QMAKE_CXXFLAGS += -std=c++0x -} +#------------------------------------------------- +# +# Project created by QtCreator 2015-11-03T22:30:34 +# +#------------------------------------------------- + +QT += core gui \ + multimedia + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = NineChess +TEMPLATE = app + +CONFIG += warn_off + +INCLUDEPATH += include +INCLUDEPATH += src/base +INCLUDEPATH += src/ai +INCLUDEPATH += src/game +INCLUDEPATH += src/ui/qt + +SOURCES += \ + src/main.cpp \ + src/base/thread.cpp \ + src/ai/search.cpp \ + src/game/ninechess.cpp \ + src/ui/qt/ninechesswindow.cpp \ + src/ui/qt/pieceitem.cpp \ + src/ui/qt/server.cpp \ + src/ui/qt/boarditem.cpp \ + src/ui/qt/gamecontroller.cpp \ + src/ui/qt/gamescene.cpp \ + src/ui/qt/gameview.cpp \ + src/ui/qt/client.cpp + +HEADERS += \ + include/config.h \ + include/version.h \ + include/version.h.template \ + src/base/HashNode.h \ + src/base/hashMap.h \ + src/base/MemoryPool.h \ + src/base/MemoryPool.tcc \ + src/base/stackalloc.h \ + src/base/thread.h \ + src/ai/search.h \ + src/ai/zobrist.h \ + src/game/ninechess.h \ + src/ui/qt/client.h \ + src/ui/qt/gamecontroller.h \ + src/ui/qt/gamescene.h \ + src/ui/qt/gameview.h \ + src/ui/qt/graphicsconst.h \ + src/ui/qt/ninechesswindow.h \ + src/ui/qt/pieceitem.h \ + src/ui/qt/manuallistview.h \ + src/ui/qt/server.h \ + src/ui/qt/boarditem.h + +FORMS += \ + ninechesswindow.ui + +RESOURCES += \ + ninechesswindow.qrc + +DISTFILES += \ + NineChess.rc \ + version.sh + +RC_FILE += NineChess.rc + +# With C++17 support +greaterThan(QT_MAJOR_VERSION, 4) { +CONFIG += c++17 +#QMAKE_CXXFLAGS += -O0 -g3 -fsanitize=leak -fno-omit-frame-pointer +#QMAKE_LFLAGS += -fsanitize=leak +} else { +QMAKE_CXXFLAGS += -std=c++0x +} diff --git a/NineChess/src/ninechessai_ab.cpp b/NineChess/src/ai/search.cpp similarity index 99% rename from NineChess/src/ninechessai_ab.cpp rename to NineChess/src/ai/search.cpp index 4f2047e5..7371b6b8 100644 --- a/NineChess/src/ninechessai_ab.cpp +++ b/NineChess/src/ai/search.cpp @@ -27,7 +27,7 @@ #include #include -#include "ninechessai_ab.h" +#include "search.h" #include "hashmap.h" using namespace CTSL; diff --git a/NineChess/src/ninechessai_ab.h b/NineChess/src/ai/search.h similarity index 100% rename from NineChess/src/ninechessai_ab.h rename to NineChess/src/ai/search.h diff --git a/NineChess/src/zobrist.h b/NineChess/src/ai/zobrist.h similarity index 100% rename from NineChess/src/zobrist.h rename to NineChess/src/ai/zobrist.h diff --git a/NineChess/src/HashNode.h b/NineChess/src/base/HashNode.h similarity index 100% rename from NineChess/src/HashNode.h rename to NineChess/src/base/HashNode.h diff --git a/NineChess/src/MemoryPool.h b/NineChess/src/base/MemoryPool.h similarity index 100% rename from NineChess/src/MemoryPool.h rename to NineChess/src/base/MemoryPool.h diff --git a/NineChess/src/MemoryPool.tcc b/NineChess/src/base/MemoryPool.tcc similarity index 100% rename from NineChess/src/MemoryPool.tcc rename to NineChess/src/base/MemoryPool.tcc diff --git a/NineChess/src/hashmap.h b/NineChess/src/base/hashmap.h similarity index 100% rename from NineChess/src/hashmap.h rename to NineChess/src/base/hashmap.h diff --git a/NineChess/src/StackAlloc.h b/NineChess/src/base/stackalloc.h similarity index 100% rename from NineChess/src/StackAlloc.h rename to NineChess/src/base/stackalloc.h diff --git a/NineChess/src/aithread.cpp b/NineChess/src/base/thread.cpp similarity index 99% rename from NineChess/src/aithread.cpp rename to NineChess/src/base/thread.cpp index d7d3d812..64fa4035 100644 --- a/NineChess/src/aithread.cpp +++ b/NineChess/src/base/thread.cpp @@ -22,7 +22,7 @@ #include #include -#include "aithread.h" +#include "thread.h" AiThread::AiThread(int id, QObject *parent) : QThread(parent), diff --git a/NineChess/src/aithread.h b/NineChess/src/base/thread.h similarity index 99% rename from NineChess/src/aithread.h rename to NineChess/src/base/thread.h index 70771692..48cc60c5 100644 --- a/NineChess/src/aithread.h +++ b/NineChess/src/base/thread.h @@ -27,7 +27,7 @@ #include #include #include "ninechess.h" -#include "ninechessai_ab.h" +#include "search.h" #include "server.h" #include "client.h" diff --git a/NineChess/src/ninechess.cpp b/NineChess/src/game/ninechess.cpp similarity index 99% rename from NineChess/src/ninechess.cpp rename to NineChess/src/game/ninechess.cpp index da0ba455..f010e9b8 100644 --- a/NineChess/src/ninechess.cpp +++ b/NineChess/src/game/ninechess.cpp @@ -21,7 +21,7 @@ #include #include "ninechess.h" -#include "ninechessai_ab.h" +#include "search.h" #include // 对静态常量数组的定义要放在类外,不要放在头文件 diff --git a/NineChess/src/ninechess.h b/NineChess/src/game/ninechess.h similarity index 100% rename from NineChess/src/ninechess.h rename to NineChess/src/game/ninechess.h diff --git a/NineChess/src/boarditem.cpp b/NineChess/src/ui/qt/boarditem.cpp similarity index 100% rename from NineChess/src/boarditem.cpp rename to NineChess/src/ui/qt/boarditem.cpp diff --git a/NineChess/src/boarditem.h b/NineChess/src/ui/qt/boarditem.h similarity index 100% rename from NineChess/src/boarditem.h rename to NineChess/src/ui/qt/boarditem.h diff --git a/NineChess/src/client.cpp b/NineChess/src/ui/qt/client.cpp similarity index 97% rename from NineChess/src/client.cpp rename to NineChess/src/ui/qt/client.cpp index 0dd4aae7..cc788f0a 100644 --- a/NineChess/src/client.cpp +++ b/NineChess/src/ui/qt/client.cpp @@ -22,7 +22,7 @@ #include #include "client.h" -#include "aithread.h" +#include "thread.h" Client::Client(QWidget *parent, uint16_t port) : QDialog(parent) diff --git a/NineChess/src/client.h b/NineChess/src/ui/qt/client.h similarity index 100% rename from NineChess/src/client.h rename to NineChess/src/ui/qt/client.h diff --git a/NineChess/src/gamecontroller.cpp b/NineChess/src/ui/qt/gamecontroller.cpp similarity index 100% rename from NineChess/src/gamecontroller.cpp rename to NineChess/src/ui/qt/gamecontroller.cpp diff --git a/NineChess/src/gamecontroller.h b/NineChess/src/ui/qt/gamecontroller.h similarity index 99% rename from NineChess/src/gamecontroller.h rename to NineChess/src/ui/qt/gamecontroller.h index 3aa87cb7..9e2918dc 100644 --- a/NineChess/src/gamecontroller.h +++ b/NineChess/src/ui/qt/gamecontroller.h @@ -40,7 +40,7 @@ #include "ninechess.h" #include "gamescene.h" #include "pieceitem.h" -#include "aithread.h" +#include "thread.h" #include "server.h" #include "client.h" diff --git a/NineChess/src/gamescene.cpp b/NineChess/src/ui/qt/gamescene.cpp similarity index 100% rename from NineChess/src/gamescene.cpp rename to NineChess/src/ui/qt/gamescene.cpp diff --git a/NineChess/src/gamescene.h b/NineChess/src/ui/qt/gamescene.h similarity index 100% rename from NineChess/src/gamescene.h rename to NineChess/src/ui/qt/gamescene.h diff --git a/NineChess/src/gameview.cpp b/NineChess/src/ui/qt/gameview.cpp similarity index 100% rename from NineChess/src/gameview.cpp rename to NineChess/src/ui/qt/gameview.cpp diff --git a/NineChess/src/gameview.h b/NineChess/src/ui/qt/gameview.h similarity index 100% rename from NineChess/src/gameview.h rename to NineChess/src/ui/qt/gameview.h diff --git a/NineChess/src/graphicsconst.h b/NineChess/src/ui/qt/graphicsconst.h similarity index 100% rename from NineChess/src/graphicsconst.h rename to NineChess/src/ui/qt/graphicsconst.h diff --git a/NineChess/src/manuallistview.h b/NineChess/src/ui/qt/manuallistview.h similarity index 100% rename from NineChess/src/manuallistview.h rename to NineChess/src/ui/qt/manuallistview.h diff --git a/NineChess/src/ninechesswindow.cpp b/NineChess/src/ui/qt/ninechesswindow.cpp similarity index 100% rename from NineChess/src/ninechesswindow.cpp rename to NineChess/src/ui/qt/ninechesswindow.cpp diff --git a/NineChess/src/ninechesswindow.h b/NineChess/src/ui/qt/ninechesswindow.h similarity index 100% rename from NineChess/src/ninechesswindow.h rename to NineChess/src/ui/qt/ninechesswindow.h diff --git a/NineChess/src/pieceitem.cpp b/NineChess/src/ui/qt/pieceitem.cpp similarity index 100% rename from NineChess/src/pieceitem.cpp rename to NineChess/src/ui/qt/pieceitem.cpp diff --git a/NineChess/src/pieceitem.h b/NineChess/src/ui/qt/pieceitem.h similarity index 100% rename from NineChess/src/pieceitem.h rename to NineChess/src/ui/qt/pieceitem.h diff --git a/NineChess/src/server.cpp b/NineChess/src/ui/qt/server.cpp similarity index 100% rename from NineChess/src/server.cpp rename to NineChess/src/ui/qt/server.cpp diff --git a/NineChess/src/server.h b/NineChess/src/ui/qt/server.h similarity index 100% rename from NineChess/src/server.h rename to NineChess/src/ui/qt/server.h