Cell.cpp 288 B

1234567891011121314151617
  1. #include "Cell.h"
  2. #include <iostream>
  3. Cell::Cell()
  4. {figure = nullptr;}
  5. Cell::Cell(Figure* fig)
  6. {
  7. figure = fig;
  8. }
  9. std::ostream& operator <<(std::ostream& out, Cell& cell)
  10. {
  11. if (cell.figure == nullptr) out << ". ";
  12. else out << cell.figure->print() << ' ';
  13. return out;
  14. }