Fishtank
screen.h
Go to the documentation of this file.
1 #pragma once
2 
4 class Screen {
5 public:
9  explicit Screen(int width, int height);
11  int width() const;
13  int height() const;
20  virtual void charAtPut(int col, int row, char value) = 0;
23  virtual void clear() = 0;
24 
25 protected:
26  void checkCoordinates(int col, int row) const;
27 
28  int width_;
29  int height_;
30 };
Represents the abstract notion of a character-addressable writable screen.
Definition: screen.h:4
Screen(int width, int height)
Definition: screen.cpp:5
int width_
Definition: screen.h:28
int width() const
Definition: screen.cpp:31
void checkCoordinates(int col, int row) const
Definition: screen.cpp:16
virtual void charAtPut(int col, int row, char value)=0
int height_
Definition: screen.h:29
int height() const
Definition: screen.cpp:33
virtual void clear()=0