Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
cmake_minimum_required(VERSION 3.10)

project(snake LANGUAGES C)
project(applicant LANGUAGES C)

# find_package(ncurses REQUIRED)
add_executable(snake src/main.c
# TODO: Find a way to check or autoinstall ncurses on Windows
add_executable(fieldgame
src/main.c
src/bot.c
)
add_library(applicant
src/applicant.c
src/bot.c)
target_include_directories(snake PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_link_libraries(snake ncurses)
)
target_include_directories(fieldgame PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_include_directories(applicant PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_link_libraries(fieldgame ncurses applicant)

30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# applicant

Library to create programs with genetic algorithms.

# Requirements

- PC + Monitor + Keyboard + Mouse
- Mind + Straight hands
- NCurses (For fieldgame)
- C compiler (GCC/Clang/e.t.c.)
- CMake 3.10+

# Build

```sh
mkdir build
cd build
cmake ..
cd ..
cmake --build build
```

CROSSPLATFORM EXECUTION (Works on `Linux`, maybe work on `Windows`, if you installed `CMake` directly to `CMD`, or `powershell`, and there is ncurses)

# Run

```sh
build/fieldgame
```
Or `Double LMB` on `fieldgame`(`fieldgame.exe` on windows) file at build folder.
Loading