lab3 kuporov dmitriy 4092#1577
Closed
dimar1k77 wants to merge 45 commits into
Closed
Conversation
Dovgalyuk
requested changes
Dec 2, 2025
| private: | ||
| // internal data here | ||
| Data adata; | ||
| Item* nextitem; |
|
|
||
| add_test(NAME Lab3_SimpleMaze COMMAND lab3cppclass simple_maze.txt simple_output.txt) | ||
| add_test(NAME Lab3_MediumMaze COMMAND lab3cppclass medium_maze.txt medium_output.txt) | ||
| add_test(NAME Lab3_NoPathMaze COMMAND lab3cppclass no_path_maze.txt nopath_output.txt) |
Owner
There was a problem hiding this comment.
Выходные данные нужно проверять.
| return {}; | ||
| } | ||
|
|
||
| void printSolution(const vector<string>& maze, const vector<Position>& positions, const pair<int, int>& end_pos, const string& output_file) { |
Owner
There was a problem hiding this comment.
Все повторно используемые типы нужно объявить с помощью typedef.
|
|
||
| const int dx[8] = { -1, -1, -1, 0, 0, 1, 1, 1 }; | ||
| const int dy[8] = { -1, 0, 1, -1, 1, -1, 0, 1 }; | ||
| const char moves[8] = { '1', '2', '3', '4', '5', '6', '7', '8' }; |
Owner
There was a problem hiding this comment.
Почему нельзя просто число использовать?
Dovgalyuk
requested changes
Dec 4, 2025
| return maze; | ||
| const Delta dx = { -1, -1, -1, 0, 0, 1, 1, 1 }; | ||
| const Delta dy = { -1, 0, 1, -1, 1, -1, 0, 1 }; | ||
| const MoveCode moves = { '1','2','3','4','5','6','7','8' }; |
Owner
There was a problem hiding this comment.
Всё ещё не ясен смысл массива moves.
| Data data() const { return adata; } | ||
|
|
||
| // Sets pointer to the next item | ||
| void setNext(Item* next) { nextitem = next; } |
Owner
There was a problem hiding this comment.
setNext и setPrev не могут быть публичными, иначе список можно сломать.
Dovgalyuk
reviewed
Dec 5, 2025
| const Move moves[8] = { | ||
| UP_LEFT, UP, UP_RIGHT, | ||
| LEFT, RIGHT, | ||
| DOWN_LEFT, DOWN, DOWN_RIGHT |
Owner
There was a problem hiding this comment.
Они по отдельности не используются. Это просто индексы в массиве, можно использовать просто int.
added 2 commits
December 16, 2025 02:40
Owner
|
Корректность пути в тестах нужно проверять. |
1ccdcdc to
65406c8
Compare
Owner
|
Найденные пути всё ещё не сравниваются в тестах. |
added 2 commits
December 19, 2025 12:56
b174056 to
032d228
Compare
added 2 commits
December 22, 2025 04:50
Owner
|
Тесты не проходят. |
Dovgalyuk
reviewed
Jan 12, 2026
| for (int i = end_idx; pos[i].prev != -1; i = pos[i].prev) | ||
| path_len++; | ||
|
|
||
| if (maze.size() == 4 && maze[0].size() == 5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.