Skip to content

Commit

Permalink
deploy: f4d9a5f
Browse files Browse the repository at this point in the history
  • Loading branch information
tolstenko committed Aug 28, 2023
0 parents commit 860e5a4
Show file tree
Hide file tree
Showing 585 changed files with 138,625 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions 404.html

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions CHANGELOG/index.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
courses.tolstenko.net
29 changes: 29 additions & 0 deletions CODE_OF_CONDUCT/index.html

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions advanced/01-introduction/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
subdirlist(activity_dir ${CMAKE_CURRENT_SOURCE_DIR})

foreach(subdir ${activity_dir})
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/CMakeLists.txt")
add_subdirectory(${subdir})
endif()
endforeach()
14 changes: 14 additions & 0 deletions advanced/01-introduction/actvities/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
file(GLOB adv_intro_src CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)

enable_testing()

add_executable(adv-01-intro ${adv_intro_src})
include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake)
target_include_directories(adv-01-intro PUBLIC ${DOCTEST_INCLUDE_DIR})
target_link_libraries(adv-01-intro doctest::doctest)
doctest_discover_tests(adv-01-intro)

if(ENABLE_TEST_COVERAGE)
target_compile_options(adv-01-intro PUBLIC -O0 -g -fprofile-arcs -ftest-coverage)
target_link_options(adv-01-intro PUBLIC -fprofile-arcs -ftest-coverage)
endif()
25 changes: 25 additions & 0 deletions advanced/01-introduction/actvities/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest/doctest.h>
using namespace std;

// create a function that allocates memory on the heap and returns a raw pointer to it
char* allocateMemoryAndClear(int numBytes, char value) {
// implement this function
}

// create a function that deallocates memory on the heap
void deallocateMemory(char*& ptr) {
// implement this function
}


// DO NOT CHANGE THE CODE BELOW THIS LINE
TEST_CASE("allocateMemory") {
char* ptr = allocateMemoryAndClear(3, 'u');
CHECK(ptr != nullptr);
CHECK(ptr[0] == 'u');
CHECK(ptr[1] == 'u');
CHECK(ptr[2] == 'u');
deallocateMemory(ptr);
CHECK(ptr == nullptr);
}
91 changes: 91 additions & 0 deletions advanced/01-introduction/index.html

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions advanced/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
subdirlist(advcpp_chapters ${CMAKE_CURRENT_SOURCE_DIR})

foreach(subdir ${advcpp_chapters})
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/CMakeLists.txt")
add_subdirectory(${subdir})
endif()
endforeach()
29 changes: 29 additions & 0 deletions advanced/index.html

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions algorithms/index.html

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions artificialintelligence/00-introduction/index.html

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions artificialintelligence/01-pcg/index.html

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions artificialintelligence/02-sm/index.html

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions artificialintelligence/03-boardgames/index.html

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions artificialintelligence/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
function(add_custom_test TEST_NAME TEST_EXECUTABLE TEST_INPUT_LIST TEST_EXPECTED_OUTPUT_LIST)
list(LENGTH TEST_INPUT_LIST num_tests)

MATH(EXPR num_tests "${num_tests} - 1")
message(STATUS "Adding ${num_tests} tests for ${TEST_NAME}.")

set(TEST_COMMANDS "")
foreach(index RANGE 0 ${num_tests})
list(GET TEST_INPUT_LIST ${index} TEST_INPUT)
list(GET TEST_EXPECTED_OUTPUT_LIST ${index} TEST_EXPECTED_OUTPUT)

list(APPEND TEST_COMMANDS
COMMAND ${CMAKE_COMMAND} -E echo "Running test: ${TEST_NAME}_${index}. Using input file: ${TEST_INPUT}"
COMMAND ${CMAKE_COMMAND} -E cat ${TEST_INPUT}
COMMAND ${CMAKE_COMMAND} -E echo "=================================="
COMMAND ${CMAKE_COMMAND} -E echo "Expected Output from ${TEST_NAME}_${index}:"
COMMAND ${CMAKE_COMMAND} -E cat ${TEST_EXPECTED_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E echo "=================================="
COMMAND ${TEST_EXECUTABLE} < ${TEST_INPUT} > test_output_${index}.txt
COMMAND ${CMAKE_COMMAND} -E echo "Actual Output from ${TEST_NAME}_${index}:"
COMMAND ${CMAKE_COMMAND} -E cat test_output_${index}.txt
COMMAND ${CMAKE_COMMAND} -E echo "=================================="
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_EXPECTED_OUTPUT} test_output_${index}.txt
COMMAND ${CMAKE_COMMAND} -E echo "Test ${TEST_NAME}_${index} passed."
)
endforeach()

add_custom_target(${TEST_NAME}
${TEST_COMMANDS}
DEPENDS ${TEST_EXECUTABLE}
)
endfunction()

add_subdirectory(assignments/maze)
add_subdirectory(assignments/life)
29 changes: 29 additions & 0 deletions artificialintelligence/animation/index.html

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions artificialintelligence/assignments/catchthecat/index.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions artificialintelligence/assignments/flocking/index.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions artificialintelligence/assignments/index.html

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions artificialintelligence/assignments/life/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
add_executable(ai-life life.cpp)

file(GLOB TEST_INPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.in)
file(GLOB TEST_OUTPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.out)

add_custom_test(ai-life-test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ai-life "${TEST_INPUT_FILES}" "${TEST_OUTPUT_FILES}")

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions artificialintelligence/assignments/life/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions artificialintelligence/assignments/life/life.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main(){
return 0;
};
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/life/tests/test-a.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
3 3 2
.#.
.#.
...
3 changes: 3 additions & 0 deletions artificialintelligence/assignments/life/tests/test-a.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
...
...
...
6 changes: 6 additions & 0 deletions artificialintelligence/assignments/life/tests/test-b.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
5 5 16
.....
..#..
...#.
.###.
.....
5 changes: 5 additions & 0 deletions artificialintelligence/assignments/life/tests/test-b.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.#...
..#..
###..
.....
.....
5 changes: 5 additions & 0 deletions artificialintelligence/assignments/life/tests/test-c.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
4 4 9
....
.##.
.##.
....
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/life/tests/test-c.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
....
.##.
.##.
....
6 changes: 6 additions & 0 deletions artificialintelligence/assignments/life/tests/test-d.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
5 5 5
.....
..#..
..#..
..#..
.....
5 changes: 5 additions & 0 deletions artificialintelligence/assignments/life/tests/test-d.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.....
.....
.###.
.....
.....
6 changes: 6 additions & 0 deletions artificialintelligence/assignments/life/tests/test-e.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
6 5 4
......
......
.###..
...#..
......
5 changes: 5 additions & 0 deletions artificialintelligence/assignments/life/tests/test-e.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
......
..##..
.#..#.
..##..
......
8 changes: 8 additions & 0 deletions artificialintelligence/assignments/life/tests/test-f.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
9 7 4
.........
..##.....
.####....
.##.##...
...##....
.........
.........
7 changes: 7 additions & 0 deletions artificialintelligence/assignments/life/tests/test-f.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.........
....##...
...####..
...##.##.
.....##..
.........
.........
12 changes: 12 additions & 0 deletions artificialintelligence/assignments/life/tests/test-g.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
11 11 9
...........
...........
...........
...........
.....#.....
....###....
.....#.....
...........
...........
...........
...........
11 changes: 11 additions & 0 deletions artificialintelligence/assignments/life/tests/test-g.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
...........
.....#.....
.....#.....
.....#.....
...........
.###...###.
...........
.....#.....
.....#.....
.....#.....
...........
10 changes: 10 additions & 0 deletions artificialintelligence/assignments/life/tests/test-h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
9 9 9
.........
.##......
.#.......
..#.#....
.........
....#.#..
.......#.
......##.
.........
9 changes: 9 additions & 0 deletions artificialintelligence/assignments/life/tests/test-h.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.........
.##......
.#.#.....
.........
...#.#...
.........
.....#.#.
......##.
.........
14 changes: 14 additions & 0 deletions artificialintelligence/assignments/life/tests/test-i.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
13 13 13
.............
.....#.#.....
...#..#..#...
....#.#.#....
..###.#.###..
......#......
.#####.#####.
......#......
..###.#.###..
....#.#.#....
...#..#..#...
.....#.#.....
.............
13 changes: 13 additions & 0 deletions artificialintelligence/assignments/life/tests/test-i.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.............
......#......
....#.#.#....
..#.#.#.#.#..
...##.#.##...
.#....#....#.
..####.####..
.#....#....#.
...##.#.##...
..#.#.#.#.#..
....#.#.#....
......#......
.............
18 changes: 18 additions & 0 deletions artificialintelligence/assignments/life/tests/test-j.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
17 17 7
.................
.................
....###...###....
.................
..#....#.#....#..
..#....#.#....#..
..#....#.#....#..
....###...###....
.................
....###...###....
..#....#.#....#..
..#....#.#....#..
..#....#.#....#..
.................
....###...###....
.................
.................
17 changes: 17 additions & 0 deletions artificialintelligence/assignments/life/tests/test-j.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.................
.....#.....#.....
.....#.....#.....
.....##...##.....
.................
.###..##.##..###.
...#.#.#.#.#.#...
.....##...##.....
.................
.....##...##.....
...#.#.#.#.#.#...
.###..##.##..###.
.................
.....##...##.....
.....#.....#.....
.....#.....#.....
.................
18 changes: 18 additions & 0 deletions artificialintelligence/assignments/life/tests/test-k.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
17 17 992
.................
.....#.....#.....
.....#.....#.....
.....##...##.....
.................
.###..##.##..###.
...#.#.#.#.#.#...
.....##...##.....
.................
.....##...##.....
...#.#.#.#.#.#...
.###..##.##..###.
.................
.....##...##.....
.....#.....#.....
.....#.....#.....
.................
17 changes: 17 additions & 0 deletions artificialintelligence/assignments/life/tests/test-k.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.................
.................
....###...###....
.................
..#....#.#....#..
..#....#.#....#..
..#....#.#....#..
....###...###....
.................
....###...###....
..#....#.#....#..
..#....#.#....#..
..#....#.#....#..
.................
....###...###....
.................
.................
16 changes: 16 additions & 0 deletions artificialintelligence/assignments/life/tests/test-l.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
12 17 100
............
.....##.....
....####....
............
...######...
....####....
............
...##..##...
.##.#..#.##.
....#..#....
............
............
.....##.....
.....##.....
............
17 changes: 17 additions & 0 deletions artificialintelligence/assignments/life/tests/test-l.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
............
............
.....##.....
.....##.....
............
............
............
............
.....##.....
....####....
............
...######...
....####....
............
...##..##...
.##.#..#.##.
....#..#....
13 changes: 13 additions & 0 deletions artificialintelligence/assignments/life/tests/test-m.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
17 12 180
.................
.......#.........
.......#.........
........#..#.....
......###.##.#...
..##......##.##..
..##......##.##..
......###.##.#...
........#..#.....
.......#.........
.......#.........
.................
Loading

0 comments on commit 860e5a4

Please sign in to comment.