-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathElement.cpp
More file actions
38 lines (31 loc) · 933 Bytes
/
Element.cpp
File metadata and controls
38 lines (31 loc) · 933 Bytes
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
#include "Material.h"
#include "Element.h"
#include <string>
#include <ncurses.h>
using namespace std;
Element::Element(string pTipo, int temp) : Material(){
tipo=pTipo;
heatness=temp;
descripcion="With "+tipo+" you can create certain stones or Kopemons";
}
string Element::show(){
return tipo;
}
string Element::toString(){
return "Element type:"+tipo+" Element\nHeatness: "+to_string(heatness)+"°C\nUse: "+descripcion;
}
string Element::help(){
return descripcion;
}
void Element::printString(int y, int x){
mvprintw(y,x, "Stone Name: %s", tipo.c_str());
mvprintw(y+1,x, "Heatness: %d", heatness);
mvprintw(y+2,x, "Use: %s", descripcion.c_str());
}
void Element::wprintString(WINDOW* ventana, int y, int x){
mvwprintw(ventana,y,x, "Stone Name: %s", tipo.c_str());
mvwprintw(ventana,y+1,x, "Heatness: %d", heatness);
mvwprintw(ventana,y+2,x, "Use: %s", descripcion.c_str());
}
Element::~Element(){
}