• 大小: 11.64MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-07
  • 语言: 其他
  • 标签: robocup  rescue  

资源简介

东南大学robocup rescue底层代码

资源截图

代码片段和文件信息

package kernel;

import java.util.Collection;
import java.util.Set;
import java.util.HashSet;
import java.util.Map;
import java.util.Arrays;

import rescuecore2.messages.Command;
import rescuecore2.config.Config;
import rescuecore2.worldmodel.Entity;
import rescuecore2.worldmodel.WorldModel;
import rescuecore2.misc.collections.LazyMap;

/**
   Abstract base class for communication models.
 */
public abstract class AbstractCommunicationModel implements CommunicationModel {
    private Map> hearing;

    /**
       Construct an AbstractCommunicationModel.
    */
    public AbstractCommunicationModel() {
        hearing = new LazyMap>() {
            @Override
            public Set createValue() {
                return new HashSet();
            }
        };
    }

    @Override
    public void initialise(Config config WorldModel model) {
        hearing.clear();
    }

    @Override
    public void process(int time Collection agentCommands) {
        hearing.clear();
    }

    @Override
    public Collection getHearing(Entity agent) {
        return hearing.get(agent);
    }

    /**
       Register a set of heard messages for an agent.
       @param agent The agent.
       @param c The messages heard.
    */
    protected void addHearing(Entity agent Command... c) {
        addHearing(agent Arrays.asList(c));
    }

    /**
       Register a set of heard messages for an agent.
       @param agent The agent.
       @param c The messages heard.
    */
    protected void addHearing(Entity agent Collection c) {
        hearing.get(agent).addAll(c);
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-10-21 11:50  sample\
     文件         570  2011-06-27 17:29  sample\.classpath
     目录           0  2011-10-21 11:50  sample\.hg\
     文件           0  2011-07-05 21:18  sample\.hgignore
     文件          57  2011-07-05 21:18  sample\.hg\00changelog.i
     文件          93  2011-07-09 21:24  sample\.hg\branchheads.cache
     文件        8843  2011-07-09 22:57  sample\.hg\dirstate
     文件         132  2011-07-09 21:23  sample\.hg\hgrc
     文件          36  2011-07-09 21:24  sample\.hg\last-message.txt
     文件          15  2011-07-05 21:18  sample\.hg\requires
     目录           0  2011-10-21 11:50  sample\.hg\store\
     文件        3597  2011-07-09 21:24  sample\.hg\store\00changelog.i
     文件        8065  2011-07-09 21:24  sample\.hg\store\00manifest.i
     目录           0  2011-10-21 11:50  sample\.hg\store\data\
     文件         289  2011-07-06 13:44  sample\.hg\store\data\.classpath.i
     文件          64  2011-07-06 13:44  sample\.hg\store\data\.hgignore.i
     文件         262  2011-07-06 13:44  sample\.hg\store\data\.project.i
     文件         140  2011-07-06 13:44  sample\.hg\store\data\delete.sh.i
     目录           0  2011-10-21 11:50  sample\.hg\store\data\lib\
     文件       14865  2011-07-06 13:44  sample\.hg\store\data\lib\jsi-1.0b2p1.jar.i
     文件      356990  2011-07-06 13:44  sample\.hg\store\data\lib\log4j-1.2.15.jar.d
     文件          64  2011-07-06 13:44  sample\.hg\store\data\lib\log4j-1.2.15.jar.i
     文件      294065  2011-07-06 13:44  sample\.hg\store\data\lib\rescuecore2.jar.d
     文件          64  2011-07-06 13:44  sample\.hg\store\data\lib\rescuecore2.jar.i
     文件      414208  2011-07-06 13:44  sample\.hg\store\data\lib\standard.jar.d
     文件          64  2011-07-06 13:44  sample\.hg\store\data\lib\standard.jar.i
     文件      286976  2011-07-06 13:44  sample\.hg\store\data\lib\trove-0.1.8.jar.d
     文件          64  2011-07-06 13:44  sample\.hg\store\data\lib\trove-0.1.8.jar.i
     文件       41097  2011-07-06 13:44  sample\.hg\store\data\lib\uncommons-maths-1.2.1.jar.i
     文件         399  2011-07-09 21:24  sample\.hg\store\data\makefile.i
     目录           0  2011-10-21 11:50  sample\.hg\store\data\nodecache\
............此处省略1907个文件信息

评论

共有 条评论