-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpared.cpp
More file actions
58 lines (49 loc) · 721 Bytes
/
pared.cpp
File metadata and controls
58 lines (49 loc) · 721 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include "pared.h"
Pared::Pared(Laberinto * l,int x, int y):Posicion(l,x,y)
{
setcolor(BROWN);
setfillstyle(9, BROWN);
_left=10;
_top=80;
_right=25;
_bottom=95;
_pr=NULL;
_pr=new Rectangulo(
_left+(LADO*getx()),
_top+(LADO*gety()),
_right+(LADO*getx()),
_bottom+(LADO*gety())
);
}
Pared::~Pared()
{
if(_pr)delete _pr;
}
void Pared::dibujar()
{
_pr->dibujar();
}
char Pared::getTipo()
{
return 'P';
}
void Pared::setLeft(int left)
{
_left=left;
}
void Pared::setTop(int top)
{
_top=top;
}
void Pared::setRight(int right)
{
_right=right;
}
void Pared::setBottom(int bottom)
{
_bottom=bottom;
}
bool Pared::esValida()
{
return false;
}