36 lines
760 B
C++
36 lines
760 B
C++
/*
|
|
* CS 246 Final Project
|
|
* File: display.h
|
|
* Purpose: handles map functionality
|
|
*/
|
|
|
|
#ifndef __DISPLAY_H__
|
|
#define __DISPLAY_H__
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <vector>
|
|
#include "position.h"
|
|
#include "constants.h"
|
|
#include "cursor.h"
|
|
|
|
class display final {
|
|
private:
|
|
std::vector<std::string> contents;
|
|
cursor &curs;
|
|
public:
|
|
display();
|
|
display(cursor &s);
|
|
|
|
void clear();
|
|
// use this instead of overloading for clarity
|
|
void print(std::ostream &out) const;
|
|
void print_line(const std::string &line, const int linenum);
|
|
|
|
void render() const ;
|
|
|
|
// will override any character that was there
|
|
void print_position(const position &pos, const char ch);
|
|
};
|
|
|
|
#endif
|