1 package cz.cuni.amis.pogamut.udk.agent.navigation.martinnavigator;
2
3 import java.util.logging.Level;
4 import java.util.logging.Logger;
5
6 import cz.cuni.amis.pogamut.base3d.worldview.object.Location;
7 import cz.cuni.amis.pogamut.udk.agent.module.sensor.AgentInfo;
8 import cz.cuni.amis.pogamut.udk.agent.module.sensor.Players;
9 import cz.cuni.amis.pogamut.udk.agent.module.sensor.Senses;
10 import cz.cuni.amis.pogamut.udk.agent.navigation.IUDKPathRunner;
11 import cz.cuni.amis.pogamut.udk.bot.command.AdvancedLocomotion;
12 import cz.cuni.amis.pogamut.udk.bot.impl.UDKBot;
13 import cz.cuni.amis.pogamut.udk.communication.messages.gbcommands.Move;
14 import cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.NavPointNeighbourLink;
15 import cz.cuni.amis.utils.NullCheck;
16
17 public class MartinRunner implements IUDKPathRunner {
18
19
20
21
22
23
24 public void reset()
25 {
26 }
27
28
29
30 public boolean runToLocation (Location firstLocation, Location secondLocation, Location focus, NavPointNeighbourLink navPointsLink, boolean reachable)
31 {
32
33
34 bot.getAct().act(new Move().setFirstLocation(firstLocation).setSecondLocation(secondLocation).setFocusLocation(focus));
35 return true;
36 }
37
38
39
40
41 protected UDKBot bot;
42
43 protected AgentInfo memory;
44
45 protected AdvancedLocomotion body;
46
47 protected Logger log;
48
49 protected Senses senses;
50
51
52
53
54
55
56
57
58 public MartinRunner (UDKBot bot, AgentInfo agentInfo, AdvancedLocomotion locomotion, Logger log) {
59
60 NullCheck.check(bot, "bot");
61 this.bot = bot;
62 NullCheck.check(agentInfo, "agentInfo");
63 this.memory = agentInfo;
64 NullCheck.check(locomotion, "locomotion");
65 this.body = new AdvancedLocomotion(bot, log);
66 this.senses = new Senses(bot, memory, new Players(bot), log);
67 this.log = log;
68 }
69
70 }