Skip to content

Feature/adding homework - #2

Open
Ev1lEy3 wants to merge 9 commits into
mainfrom
feature/adding_homework
Open

Feature/adding homework#2
Ev1lEy3 wants to merge 9 commits into
mainfrom
feature/adding_homework

Conversation

@Ev1lEy3

@Ev1lEy3 Ev1lEy3 commented Nov 12, 2022

Copy link
Copy Markdown
Owner

No description provided.

Comment thread homework_01/task_01/src/utils.cpp Outdated

std::vector<std::string> SplitString(const std::string &str) {
std::vector<char> braces;
std::vector<std::string> res;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не экономь символы result

Comment thread homework_01/task_01/src/utils.cpp Outdated
std::vector<std::string> res;
std::string temp;
for (auto c : str) {
if ((c != ' ') and (c != '\t')) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В С++ принято использовать && а не and, ну и лишние скобки

@LostPointer LostPointer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

приятно смотреть код)

return GameState::Running;
}

f_cnt = 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

все отлично но вот тут не очень понятные названия переменных

}
return GameState::Draw;
}
std::string ToString() const {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

и вот тут пустой строки для красоты не хватает

std::string responce;
std::getline(std::cin, responce);
std::vector<std::string> vect = SplitString(responce);
Player pl1("pl1", Field::Cross);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я бы не экономил символы и назвал player_1

#include <stack>

std::vector<std::string> SplitString(const std::string& data) {
/*std::vector<std::string> SplitString(const std::string& data) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

удалил бы уж)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants