Skip to content

Commit

Permalink
Moved libraries to libs/
Browse files Browse the repository at this point in the history
  • Loading branch information
jsilll committed Sep 14, 2023
1 parent 130ae03 commit 14eb9c9
Show file tree
Hide file tree
Showing 68 changed files with 395 additions and 401 deletions.
14 changes: 4 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,8 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif ()

# -- Uci Library --
add_subdirectory(coduci)
# -- Libraries --
add_subdirectory(libs)

# -- Chess Library --
add_subdirectory(codchess)

# -- Brain Library --
add_subdirectory(codbrain)

# -- Engine --
add_subdirectory(engine)
# -- App --
add_subdirectory(app)
2 changes: 2 additions & 0 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# -- Codfish --
add_subdirectory(src)
2 changes: 1 addition & 1 deletion engine/CMakeLists.txt → app/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ add_executable(codfish ${SOURCES})

# -- Link Libraries --
target_link_libraries(codfish
PUBLIC codbrain)
PUBLIC brain)

# -- All Warnings as Errors --
if (MSVC)
Expand Down
10 changes: 4 additions & 6 deletions engine/main.cpp → app/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#include <memory>
#include <brain/codbrain.hpp>

#include <codbrain/codbrain.hpp>

using namespace cod;
using namespace codfish;

int
main([[maybe_unused]] const int argc, [[maybe_unused]] const char *argv[]) {
brain::Init();
auto brain = std::make_unique<brain::Mcts>();
brain::Mcts brain;

try {
brain->Launch();
brain.Launch();
} catch (const std::exception &e) {
std::cerr << e.what() << '\n';
return EXIT_FAILURE;
Expand Down
36 changes: 0 additions & 36 deletions codbrain/src/CMakeLists.txt

This file was deleted.

26 changes: 0 additions & 26 deletions codchess/src/CMakeLists.txt

This file was deleted.

10 changes: 0 additions & 10 deletions codchess/tests/bench/profiling/profile_codchess_perft_copy.cpp

This file was deleted.

10 changes: 0 additions & 10 deletions codchess/tests/bench/profiling/profile_codchess_perft_unmake.cpp

This file was deleted.

128 changes: 0 additions & 128 deletions codchess/tests/unit/test_perft.cpp

This file was deleted.

8 changes: 8 additions & 0 deletions libs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -- Core Library --
add_subdirectory(core)

# -- Uci Library --
add_subdirectory(uci)

# -- Brain Library --
add_subdirectory(brain)
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ file(GLOB_RECURSE SOURCES *.cpp)
# -- Executable --
add_executable(example_simple_codbrain ${SOURCES})

target_link_libraries(example_simple_codbrain PRIVATE codbrain)
target_link_libraries(example_simple_codbrain PRIVATE brain)

# -- All Warnings as Errors --
if (MSVC)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#include <codbrain/codbrain.hpp>
#include <brain/codbrain.hpp>

using namespace cod;
using namespace codfish;

int
main([[maybe_unused]] const int argc, [[maybe_unused]] const char **argv) {
brain::Init();

std::string input;
auto board = chess::Board();
auto board = core::Board();

while (true) {
board.Display(std::cout, chess::Board::DisplayType::Unicode);
board.Display(std::cout, core::Board::DisplayType::Unicode);

std::getline(std::cin, input);

if (input == "quit") {
break;
} else {
const auto moves = chess::movegen::Legal(board);
const auto moves = core::movegen::Legal(board);

bool found{false};
for (const auto move : moves) {
Expand Down
File renamed without changes.
Loading

0 comments on commit 14eb9c9

Please sign in to comment.