-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJunk.cpp
More file actions
63 lines (61 loc) · 1.52 KB
/
Junk.cpp
File metadata and controls
63 lines (61 loc) · 1.52 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Junk.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hasmith <hasmith@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/01/27 15:04:57 by lhernand #+# #+# */
/* Updated: 2019/01/27 22:46:29 by hasmith ### ########.fr */
/* */
/* ************************************************************************** */
#include "Game.hpp"
#include "Junk.hpp"
Junk::Junk(void) :
x(25),
y(25),
N(100)
{
return ;
}
Junk::~Junk(void)
{
std::cout << "Junk Destroyed" << std::endl;
}
Junk::Junk(Junk const & src)
{
*this = src;
}
Junk &Junk::operator=(Junk const & rhs)
{
if (this == &rhs)
return (*this);
this->x = rhs.getX();
this->y = rhs.getY();
this->N = rhs.getN();
return (*this);
}
int Junk::getX(void) const
{
return (this->x);
}
int Junk::getY(void) const
{
return (this->y);
}
int Junk::getN(void) const
{
return (this->N);
}
void Junk::setX(int x)
{
this->x = x;
}
void Junk::setY(int y)
{
this->y = y;
}
void Junk::setN(int N)
{
this->N = N;
}