diff --git a/include/aoc/Grid.hpp b/include/aoc/Grid.hpp index 596f142..4fdd381 100644 --- a/include/aoc/Grid.hpp +++ b/include/aoc/Grid.hpp @@ -53,6 +53,14 @@ class Grid { return rowNo * nColumns_ + data_.get(); } + + void fill(const T value) + { + for (size_t i = 0; i < nRows_ * nColumns_; i++) + { + data_[i] = value; + } + } private: size_t nRows_; size_t nColumns_;