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

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

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.massisframework.massis.ai.sposh.senses;

import com.massisframework.massis.ai.sposh.SimulationContext;
import cz.cuni.amis.pogamut.sposh.executor.PrimitiveInfo;

/**
 * Returns if the agent has a target assigned
 *
 * @author rpax
 */
@PrimitiveInfo(name = "Has Target", description = "Return if the agent has a target assigned")
public class HasTarget extends SimulationSense {

    public HasTarget(SimulationContext ctx) {
        super(ctx);
    }

   
    public Boolean query() {
        return this.ctx.getTarget()!=null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy