1 /*
2  * Copyright (C) 2011-2020 by the Widelands Development Team
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  *
18  */
19 
20 #ifndef WL_LOGIC_MAP_OBJECTS_FINDBOB_H
21 #define WL_LOGIC_MAP_OBJECTS_FINDBOB_H
22 
23 #include "logic/map.h"
24 
25 namespace Widelands {
26 
27 class Player;
28 
29 struct FindBobAttribute : public FindBob {
FindBobAttributeFindBobAttribute30 	explicit FindBobAttribute(uint32_t const init_attrib) : attrib(init_attrib) {
31 	}
32 
33 	bool accept(Bob*) const override;
34 
35 	uint32_t attrib;
~FindBobAttributeFindBobAttribute36 	~FindBobAttribute() override {
37 	}  // make gcc shut up
38 };
39 
40 /**
41  * Find soldiers which are hostile to the given player (or all soldiers
42  * if player is 0).
43  */
44 struct FindBobEnemySoldier : public FindBob {
FindBobEnemySoldierFindBobEnemySoldier45 	explicit FindBobEnemySoldier(Player* init_player) : player(init_player) {
46 	}
47 
48 	bool accept(Bob*) const override;
49 
50 	Player* player;
51 };
52 
53 struct FindBobShip : FindBob {
54 	bool accept(Bob* bob) const override;
55 };
56 
57 struct FindBobCritter : FindBob {
58 	bool accept(Bob* bob) const override;
59 };
60 
61 }  // namespace Widelands
62 
63 #endif  // end of include guard: WL_LOGIC_MAP_OBJECTS_FINDBOB_H
64