Phoenix2D-Library  0.10
WorldModel.h
Go to the documentation of this file.
1  /*
2  * Phoenix2D (RoboCup Soccer Simulation 2D League)
3  * Copyright (c) 2013 Ivan Gonzalez
4  *
5  * This file is part of Phoenix2D.
6  *
7  * Phoenix2D is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * Phoenix2D is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with Phoenix2D. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef WORLDMODEL_H_
22 #define WORLDMODEL_H_
23 
24 #include <list>
25 #include "Player.h"
26 #include "Ball.h"
27 
31 namespace Phoenix
32 {
33 
38 class WorldModel {
39  std::list<Player> players;
41 public:
42  WorldModel(std::list<Player> players, Ball ball);
43  ~WorldModel();
44  std::list<Player*> getPlayers();
45  std::list<Player*> getPlayersOrderedByDistanceTo(Position position);
46  std::list<Player*> getOurPlayers();
47  std::list<Player*> getOurPlayersOrderedByDistanceTo(Position position);
48  std::list<Player*> getOppPlayers();
49  std::list<Player*> getOppPlayersOrderedByDistanceTo(Position position);
50  std::list<Player*> getUndPlayers();
51  std::list<Player*> getUndPlayersOrderedByDistanceTo(Position position);
52  Ball* getBall();
53 };
54 
55 } // End namespace Phoenix
58 #endif /* WORLDMODEL_H_ */
WorldModel(std::list< Player > players, Ball ball)
Definition: WorldModel.cpp:33
std::list< Player * > getPlayers()
Definition: WorldModel.cpp:42
Ball The Ball lorem Ipsum
Definition: Ball.h:38
Position The Position lorem Ipsum
Definition: Position.h:50
std::list< Player * > getUndPlayersOrderedByDistanceTo(Position position)
Definition: WorldModel.cpp:114
std::list< Player > players
Definition: WorldModel.h:39
std::list< Player * > getOppPlayersOrderedByDistanceTo(Position position)
Definition: WorldModel.cpp:92
std::list< Player * > getOurPlayers()
Definition: WorldModel.cpp:60
WorldModel The WorldModel lorem Ipsum
Definition: WorldModel.h:38
std::list< Player * > getUndPlayers()
Definition: WorldModel.cpp:104
std::list< Player * > getPlayersOrderedByDistanceTo(Position position)
Definition: WorldModel.cpp:50
std::list< Player * > getOppPlayers()
Definition: WorldModel.cpp:82
std::list< Player * > getOurPlayersOrderedByDistanceTo(Position position)
Definition: WorldModel.cpp:70