1 package nl.tudelft.goal.ut2004.selector;
2
3 import java.util.Collection;
4
5 import cz.cuni.amis.pogamut.base3d.worldview.object.ILocated;
6 import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
7 import cz.cuni.amis.utils.NullCheck;
8
9
10
11
12
13
14
15 public class APlayer extends ContextSelector {
16
17 protected final UnrealId id;
18
19 public APlayer(UnrealId id) {
20 NullCheck.check(id, "id");
21 this.id = id;
22 }
23
24 @Override
25 public ILocated select(Collection<? extends ILocated> c) {
26
27
28 return modules.getPlayers().getVisiblePlayers().get(id);
29 }
30
31
32
33
34
35
36 @Override
37 public String toString() {
38 return "APlayer [id=" + id + "]";
39 }
40 }