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.ut2004.communication.messages.gbinfomessages.Player;
7
8
9
10
11
12
13
14 public final class NearestFriendly extends ContextSelector {
15
16
17
18
19 @Override
20 public String toString() {
21 return "NearestFriendly";
22 }
23
24 @Override
25 public ILocated select(Collection<? extends ILocated> targets) {
26
27 return modules.getPlayers().getNearestVisibleFriend();
28 }
29
30 }