Template Function ADS::floodFill
Defined in File Grid.h
Function Documentation
-
template<class T, class Moves = FourMoves>
std::size_t ADS::floodFill(std::vector<std::vector<T>> &M, int r, int c, const std::type_identity_t<T> &color, const Moves &moves = FOUR_MOVES) floodFill(): the cell ( r , c ) of M and all the cells joined to it by moves through cells of its colour get the colour color; the number of cells painted, 0 if color is already the colour of ( r , c )
- Pre:
M is rectangular, ( r , c ) is a cell of it
- Post:
M[ r ][ c ] == color