Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<std::vector<int>> winRelation;
- for (std::size_t line = 0; line < mWinlines.size(); ++line)
- {
- std::cout << line + 1 << ": ";
- std::vector<int> winRelationLine;
- for (std::size_t winLine = 0; winLine < mWinlines.size(); ++winLine)
- {
- bool success = true;
- bool connected = true;
- for(int i = 0; i < 3; i++)
- {
- if (mWinlines[winLine][i] != mWinlines[line][i])
- {
- if (connected)
- {
- connected = false;
- }
- else
- {
- success = false;
- break;
- }
- }
- }
- if (success)
- {
- winRelationLine.push_back(winLine);
- if (winLine != line)
- std::cout << winLine + 1 << ", ";
- }
- }
- winRelation.push_back(winRelationLine);
- std::cout << " TOTAL: " << winRelation[line].size() << "\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement