com.massisframework.massis.ai.sposh.senses.IsInLocation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of massis-ai-sposh Show documentation
Show all versions of massis-ai-sposh Show documentation
SPOSH High Level Controller
package com.massisframework.massis.ai.sposh.senses;
import cz.cuni.amis.pogamut.sposh.executor.Param;
import cz.cuni.amis.pogamut.sposh.executor.PrimitiveInfo;
import com.massisframework.massis.ai.sposh.SimulationContext;
import com.massisframework.massis.model.agents.LowLevelAgent;
@PrimitiveInfo(name = "Is in location", description = "True it is in a named location")
public class IsInLocation extends SimulationSense {
public IsInLocation(SimulationContext ctx)
{
super(ctx);
}
public Boolean query(@Param("$location") String attr)
{
final LowLevelAgent agent = this.ctx.getBot();
return agent.isInNamedLocation(attr,100);
}
}