40 , applied_actions_this_turn_()
44 , has_invalid_actions_()
61 t.get_side_actions()->reset_gold_spent();
66 bool on_current_side = (u.side() == current_side);
97 for(std::size_t turn=0; !stop; ++turn) {
105 std::advance(next, 1);
157 if((**it)->get_unit().get() ==
unit.get()) {
179 std::set<unit const*> seen;
const team & viewing_team() const
static display * get_singleton()
Returns the display object if a display object exists.
int current_side() const
Returns the number of the side whose turn it is.
This class stores all the data for a single 'side' (in game nomenclature).
Container associating units to locations.
This class represents a single unit of a specific type.
Abstract base class for all the whiteboard planned actions.
virtual unit_ptr get_unit() const =0
Return the unit targeted by this action.
virtual void redraw()
Redrawing function, called each time the action situation might have changed.
virtual bool places_new_unit() const
Returns true for recall and recruit actions.
virtual void apply_temp_modifier(unit_map &unit_map)=0
Applies temporarily the result of this action to the specified unit map.
virtual error check_validity() const =0
Check the validity of the action.
std::set< unit const * > acted_this_turn_
mapbuilder(unit_map &unit_map)
std::set< unit const * > has_invalid_actions_
std::list< side_actions::iterator > invalid_actions_
Conserved invalid actions.
void build_map()
Builds every team's actions as far into the future as possible, in the correct order.
std::vector< std::unique_ptr< temporary_unit_remover > > removers_
void restore_normal_map()
void process(side_actions &sa, side_actions::iterator action_it, bool is_local_side)
Function called on each action.
void post_visit_team(std::size_t turn)
Function called after visiting a team.
action_queue applied_actions_
void pre_build()
Does various preliminary actions on the unit map such as resetting moves for some units.
std::vector< std::unique_ptr< unit_movement_resetter > > resetters_
action_queue applied_actions_this_turn_
A planned move, represented on the map by an arrow and a ghosted unit in the destination hex.
virtual void set_turn_number(int turn)
Assigns a turn number to display to this planned move.
virtual unit_ptr get_unit() const
Return the unit targeted by this action.
virtual const pathfind::marked_route & get_route() const
This internal whiteboard class holds the planned action queues for a team, and offers many utility me...
iterator remove_action(iterator position, bool validate_after_delete=true)
Deletes the action at the specified position.
container::iterator iterator
void set_movement(int moves, bool unit_action=false)
Set this unit's remaining movement to moves.
int total_movement() const
The maximum moves this unit has.
play_controller * controller
auto reversed_view(T &container)
bool team_has_visible_plan(team &t)
Returns whether a given team's plan is visible.
std::shared_ptr< move > move_ptr
std::shared_ptr< action > action_ptr
bool has_actions()
Return whether the whiteboard has actions.
std::string::const_iterator iterator
std::shared_ptr< unit > unit_ptr
std::vector< map_location > & steps
This object is used to temporary remove a unit from the unit map.
Object which temporarily resets a unit's movement.