All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.massisframework.massis.ai.sposh.senses.IsInLocation Maven / Gradle / Ivy

There is a newer version: 1.2.22
Show newest version
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);
                
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy