Last active
December 28, 2017 03:06
-
-
Save aarohmankad/61133b916ee2155634ae6d805d11f9e8 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
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; | |
} |
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<Cell> findFlaggedCells() { | |
vector<Cell> flaggedCells; | |
const int FLAGGED = 4; | |
for (Cell cell : gameBoard) { | |
if (cell.status == 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