-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCard.cpp
67 lines (56 loc) · 1.69 KB
/
Card.cpp
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
64
65
66
67
//------------------------------------------------------------------------------
// Card.cpp
//
// Group: Group 9, study assistant David Kerschbaumer
//
// Authors: Michael Zweimüller 11916150
// Martin Schachl 11907003
// Johannes Aigner 11907005
//------------------------------------------------------------------------------
//
#include "Card.hpp"
using Oop::Card;
//------------------------------------------------------------------------------
Card::Card(std::string name, int mana_cost, CardType type) :
name_(name), mana_cost_(mana_cost), type_(type)
{
}
//------------------------------------------------------------------------------
Card::Card(const Card& other) :
name_(other.getName()), mana_cost_(other.getManaCost()), type_(other.getType())
{
}
//------------------------------------------------------------------------------
Card::~Card() noexcept
{
}
//------------------------------------------------------------------------------
std::string Card::getName() const
{
return name_;
}
//------------------------------------------------------------------------------
int Card::getManaCost() const
{
return mana_cost_;
}
//------------------------------------------------------------------------------
Card::CardType Card::getType() const
{
return type_;
}
//------------------------------------------------------------------------------
void Card::setName(std::string name)
{
name_ = name;
}
//------------------------------------------------------------------------------
void Card::setManaCost(int mana_cost)
{
mana_cost_ = mana_cost;
}
//------------------------------------------------------------------------------
void Card::setType(CardType type)
{
type_ = type;
}