Skip to content

Commit 7c2889a

Browse files
authored
Update Property.cc
1 parent beabf75 commit 7c2889a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Property.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void Gym::accept(Player & p) {
4545
if (this->getOwner() == nullptr) {
4646
throw NoOwner("This property has no owner yet!");
4747
}
48-
if (this->getOwner()->getName() != p.getName() && !mortgage) {
48+
if (this->getOwner()->getName() != p.getName() && !Mortgage()) {
4949
unsigned int fee = getFee(p);
5050
p.giveMoney(this->getOwner(), fee);
5151
}
@@ -74,7 +74,7 @@ void Residence::accept(Player & p) {
7474
if (this->getOwner() == nullptr) {
7575
throw NoOwner("This property has no owner yet!");
7676
}
77-
if (this->getOwner()->getName() != p.getName() && !mortgage) {
77+
if (this->getOwner()->getName() != p.getName() && !Mortgage()) {
7878
unsigned int rent = getRent();
7979
p.giveMoney(this->getOwner(), rent);
8080
}
@@ -120,7 +120,7 @@ void Academic::accept(Player & p) {
120120
if (this->getOwner() == nullptr) {
121121
throw NoOwner("This property has no owner yet!");
122122
}
123-
if (this->getOwner()->getName() != p.getName() && !mortgage) {
123+
if (this->getOwner()->getName() != p.getName() && !Mortgage()) {
124124
unsigned int tuition = getTuition();
125125
p.giveMoney(this->getOwner(), tuition);
126126
}

0 commit comments

Comments
 (0)