4 buffer_.resize(
height, std::vector<char>(
width,
' '));
9 return buffer_[row][col];
14 buffer_[row][col] = value;
18 for (
size_t row = 0; row < buffer_.size(); row++) {
19 for (
size_t col = 0; col < buffer_[row].size(); col++) {
20 buffer_[row][col] =
' ';
28 for (
int colidx = 0; colidx <
width_; colidx++) {
32 for (
int rowidx = 0; rowidx <
height_; rowidx++) {
34 for (
int colidx = 0; colidx <
width_; colidx++) {
35 result += buffer_[rowidx][colidx];
40 for (
int colidx = 0; colidx <
width_; colidx++) {
Represents the abstract notion of a character-addressable writable screen.
void checkCoordinates(int col, int row) const
void charAtPut(int col, int row, char value)
std::string toString() const
StringScreen(int width, int height)
char charAt(int col, int row) const
Fetch the character at the given coordinate pair.