-
Notifications
You must be signed in to change notification settings - Fork 0
Changes in main and CMakeLists.txt #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| build | ||
| CMakeUserPresets.json |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| cmake_minimum_required(VERSION 3.10) | ||
|
|
||
| # Project name and version | ||
| project(LabiryntGenerator VERSION 1.1) | ||
|
|
||
| # Specify the C++ standard | ||
| set(CMAKE_CXX_STANDARD 17) | ||
| set(CMAKE_CXX_STANDARD_REQUIRED True) | ||
|
|
||
| # Add subdirectories for each module | ||
| add_subdirectory(Logs) | ||
| add_subdirectory(DrawingEngine) | ||
| add_subdirectory(Cli) | ||
| add_subdirectory(ClassFactory) | ||
| add_subdirectory(DrawingEngineFactory) | ||
|
|
||
| # Create the main executable | ||
| add_executable(LabiryntGenerator main.cpp) | ||
|
|
||
| # Find the FTXUI package | ||
| find_package(ftxui REQUIRED) | ||
|
|
||
| # Link the modules and FTXUI to the main executable | ||
| target_link_libraries(LabiryntGenerator PRIVATE Logs DrawingEngine Cli ClassFactory DrawingEngineFactory ftxui::ftxui) | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #include <iostream> | ||
| #include "./DrawingEngineFactory/DrawingEngineFactory.h" | ||
| #include "./Logs/Logs.h" | ||
| #include <memory> | ||
| #include <vector> | ||
|
|
||
| using namespace std; | ||
|
|
||
| int main(){ | ||
| writeToLogs("App start"); | ||
| //creating drawing engine factory with specific style of drawing | ||
| DrawingEngineFactory def = DrawingEngineFactory(0); | ||
| //creating drawing engine and taking poiter to it | ||
| shared_ptr<DrawingEngine> engine = def.createEngine(3,4, 'r', 'w'); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the way you defined drawing engine constructor will not make sense for FTXUI, also it will be hard to extend for borders or any other thing you would might like to add |
||
| //creating vector of vector of integers to print | ||
| vector<vector<int>> toPrint ({{0, 1, 1}, {1 , 0, 1}, {1, 0, 1}, {1, 0, 0}}); | ||
| //printing | ||
| (*engine).print(toPrint); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. engine->print(toPrint) ... |
||
| return 0; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relative paths