Пример #1
0
PointList Board::getOtherBombermans() const {
	PointList rslt;
	rslt.splice(rslt.end(), findAll(Element(LL("OTHER_BOMBERMAN"))));
	rslt.splice(rslt.end(), findAll(Element(LL("OTHER_BOMB_BOMBERMAN"))));
	rslt.splice(rslt.end(), findAll(Element(LL("OTHER_DEAD_BOMBERMAN"))));
	return rslt;
}
Пример #2
0
Point Board::getBomberman() const {
	PointList rslt;
	rslt.splice(rslt.end(), findAll(Element(LL("BOMBERMAN"))));
	rslt.splice(rslt.end(), findAll(Element(LL("BOMB_BOMBERMAN"))));
	rslt.splice(rslt.end(), findAll(Element(LL("DEAD_BOMBERMAN"))));
	return rslt.front();
}
Пример #3
0
PointList Board::getBarriers() const {
	PointList rslt = getMeatChoppers();
	rslt.splice(rslt.end(), getWalls());
	rslt.splice(rslt.end(), getBombs());
	rslt.splice(rslt.end(), getDestoyWalls());
	rslt.splice(rslt.end(), getOtherBombermans());
	return removeDuplicates(rslt);
}
Пример #4
0
PointList Board::getBombs() const {
	PointList rslt;
    rslt.splice(rslt.end(), findAll(Element(LL("BOMB_TIMER_1"))));
    rslt.splice(rslt.end(), findAll(Element(LL("BOMB_TIMER_2"))));
    rslt.splice(rslt.end(), findAll(Element(LL("BOMB_TIMER_3"))));
    rslt.splice(rslt.end(), findAll(Element(LL("BOMB_TIMER_4"))));
    rslt.splice(rslt.end(), findAll(Element(LL("BOMB_TIMER_5"))));
    rslt.splice(rslt.end(), findAll(Element(LL("BOMB_BOMBERMAN"))));
    return rslt;
}
Пример #5
0
PointList Board::getFutureBlasts() const {
	PointList bombs = getBombs();
	bombs.splice(bombs.end(), findAll(Element(LL("OTHER_BOMB_BOMBERMAN"))));
	bombs.splice(bombs.end(), findAll(Element(LL("BOMB_BOMBERMAN"))));

	PointList rslt;
	PointList walls = getWalls();
	for (auto bmb : bombs) {
		rslt.push_back(bmb);
		PointList bombSurrs = bmb.getSurrounds(size);
		for (auto surr : bombSurrs) {
			if (std::find(walls.begin(), walls.end(), surr) == walls.end()) {
				rslt.push_back(surr);
			}
		}
	}

	return removeDuplicates(rslt);
}