42 double vision_angle = 180.0 + 10.0;
44 vision_angle = 60.0 + 10.0;
46 vision_angle = 120.0 + 10.0;
48 for (std::list<Player>::iterator it =
players.begin(); it !=
players.end(); ++it) {
49 if (std::abs(
Self::getPosition().getDirectionTo(it->getPosition())) > vision_angle / 2.0) {
50 it->toggleSightRange();
51 }
else if (!(it->isInSightRange())) {
52 it->toggleSightRange();
59 double vision_angle = 180.0 + 10.0;
61 vision_angle = 60.0 + 10.0;
63 vision_angle = 120.0 + 10.0;
65 for (std::list<Player>::iterator it =
players.begin(); it !=
players.end(); ++it) {
66 if (std::abs(
Self::getPosition().getDirectionTo(it->getPosition())) > vision_angle / 2.0) {
67 new_players.push_back(*it);
69 double min_distance = 120.0;
70 Player* nearest_player = 0;
71 for (std::list<Player>::iterator it_new = new_players.begin(); it_new != new_players.end(); ++it_new) {
73 if (distance < min_distance) {
74 nearest_player = &(*it);
75 min_distance = distance;
83 for (std::list<Player>::iterator it =
players.begin(); it !=
players.end(); ++it) {
84 switch (it->getPretendersCount()) {
Player The Player lorem Ipsum
Ball The Ball lorem Ipsum
void boundTo(Player *player)
static Position getPosition()
void pretendToBound(Player *player)
WorldModel The WorldModel lorem Ipsum
void updateObserverWorld(std::list< Player > players, Ball ball)
Player * getPretenderFront()
WorldModel getWorldModel()
static std::string VIEW_MODE_WIDTH
static bool PLAYER_HISTORY
std::list< Player > players
double getDistanceTo(Position position)