-
Notifications
You must be signed in to change notification settings - Fork 0
/
TextDisplay.h
40 lines (32 loc) · 916 Bytes
/
TextDisplay.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// textDisplay.hpp
// test
//
// Created by Wang Annan on 2016-11-20.
// Copyright © 2016 Wang Annan. All rights reserved.
//
#ifndef textDisplay_hpp
#define textDisplay_hpp
#include <vector>
#include <string>
class player;
class TextDisplay {
int row, col;
const player *pc;
std::string Action;
std::vector< std::vector<std::string>> theDisplay;
public:
TextDisplay (const int &row, const int &col);
~TextDisplay();
int getRow() const;
int getCol() const;
std::string getAct() const;
const player *getPc() const;
std::string getType(const int &row, const int & col) const;
void updateAct(const std::string &mssg);
void resetAct();
void setPc(const player *pc);
void notify(const int &row, const int &col, const std::string &type);
};
std::ostream &operator<<(std::ostream &out, const TextDisplay &td);
#endif /* textDisplay_hpp */