aboutsummaryrefslogtreecommitdiff
path: root/DeleteArtistTileBehavior.cpp
blob: 71cc20e1341f8667f9b4f737c82709786e41b071 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "DeleteArtistTileBehavior.h"
#include "SetNeighborTileBehavior.h"
#include "Tile.h"
#include "Museum.h"

using namespace std;

void DeleteArtistTileBehavior::step(Artist * artist) {
	this->interactions++;
	if (artist != nullptr)
		this->museum.people.remove_artist(*artist);
}

void DeleteArtistTileBehavior::update(Tile & tile) {
	if (this->interactions == 0) return;
	tile.set_type(SetNeighborTileBehavior::type);
}