Last active
December 28, 2017 19:34
-
-
Save aarohmankad/df3803b19d15c78df6333c49e0fb5df4 to your computer and use it in GitHub Desktop.
An example of code abstraction
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> findCells(const vector<Cell>& gameBoard, const int FLAG_CODE) { | |
vector<Cell> cells; | |
for (Cell cell : gameBoard) { | |
if (cell.status == FLAG_CODE) { | |
cells.push_back(cell); | |
} | |
} | |
return cells; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment