-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStone.cpp
More file actions
46 lines (39 loc) · 1.15 KB
/
Stone.cpp
File metadata and controls
46 lines (39 loc) · 1.15 KB
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
41
42
43
44
45
46
#include "Material.h"
#include "Stone.h"
#include <string>
#include <ncurses.h>
using namespace std;
Stone::Stone(string pNombre, string pColor) : Material(){
nombre=pNombre;
color=pColor;
if (pNombre=="Thunder Stone") {
descripcion="Stone used for electric transformations";
}else if(pNombre=="Water Stone"){
descripcion="Stone used for acuatic transformations";
}else if(pNombre=="Fire Stone"){
descripcion="Stone used for fire transformations";
}else{
descripcion="Stone used for grass transformations";
}
}
string Stone::show(){
return nombre;
}
string Stone::toString(){
return "Stone Name: "+nombre+"\nColor: "+color+"\nUse: "+descripcion;
}
string Stone::help(){
return descripcion;
}
void Stone::printString(int y, int x){
mvprintw(y,x, "Stone Name: %s", nombre.c_str());
mvprintw(y+1,x, "Color: %s", color.c_str());
mvprintw(y+2,x, "Use: %s", descripcion.c_str());
}
void Stone::wprintString(WINDOW* ventana, int y, int x){
mvwprintw(ventana, y,x, "Stone Name: %s", nombre.c_str());
mvwprintw(ventana, y+1,x, "Color: %s", color.c_str());
mvwprintw(ventana, y+2,x, "Use: %s", descripcion.c_str());
}
Stone::~Stone(){
}