-
-
Save Kilenaitor/363ddfe5857b9c0b103a30439275a5a5 to your computer and use it in GitHub Desktop.
This file contains 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
vector<pair<int, int>> getThem() { | |
vector<pair<int, int>> v; | |
for (pair<int, int> x : theList) { | |
if (x.second == 4) { | |
v.push(x); | |
} | |
} | |
return v; | |
} |
This file contains 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
typdef std::pair<int, int> Cell; | |
const int FLAGGED_VALUE = 4; | |
vector<Cell> findFlaggedCells() { | |
vector<Cell> flaggedCells; | |
for(Cell cell : gameBoard) { | |
if (cell.second == FLAGGED_VALUE) { | |
flaggedCells.push_back(cell); | |
} | |
} | |
return flaggedCells; | |
} |
This file contains 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
vector<pair<int, int>> findFlaggedCells() { | |
vector<pair<int, int>> flaggedCells; | |
const int FLAGGED = 4; | |
for (pair<int, int> cell : gameBoard) { | |
if (cell.second == FLAGGED) { | |
flaggedCells.push_back(cell); | |
} | |
} | |
return flaggedCells; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment