aboutsummaryrefslogtreecommitdiff
path: root/StepTileBehavior.cpp
blob: 2023bb88fd8237a7fe5777742470879c7a4ac306 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <memory>

#include "StepTileBehavior.h"
#include "DeleteArtistTileBehavior.h"
#include "Tile.h"

using namespace std;

StepTileBehavior StepTileBehavior::instance { StepTileBehavior::type };

void StepTileBehavior::update(Tile & tile) {
	if (this->interactions < 3) return; 
	tile.set_type(DeleteArtistTileBehavior::type);
}

unique_ptr<TileBehavior> StepTileBehavior::clone(Museum & museum) {
	auto instance = new StepTileBehavior();
	instance->museum = &museum;
	return unique_ptr<TileBehavior>(instance);
}