Package eas.users.demos.rocketMan

Source Code of eas.users.demos.rocketMan.MazeAgent1

/*
* File name:        MazeAgent1.java (package eas.simulation.users.lukas.lukesPhysics3)
* Author(s):        Lukas König
* Java version:     6.0
* Generation date:  09.02.2011 (22:37:19)
*
* (c) This file and the EAS (Easy Agent Simulation) framework containing it
* is protected by Creative Commons by-nc-sa license. Any altered or
* further developed versions of this file have to meet the agreements
* stated by the license conditions.
*
* In a nutshell
* -------------
* You are free:
* - to Share -- to copy, distribute and transmit the work
* - to Remix -- to adapt the work
*
* Under the following conditions:
* - Attribution -- You must attribute the work in the manner specified by the
*   author or licensor (but not in any way that suggests that they endorse
*   you or your use of the work).
* - Noncommercial -- You may not use this work for commercial purposes.
* - Share Alike -- If you alter, transform, or build upon this work, you may
*   distribute the resulting work only under the same or a similar license to
*   this one.
*
* + Detailed license conditions (Germany):
*   http://creativecommons.org/licenses/by-nc-sa/3.0/de/
* + Detailed license conditions (unported):
*   http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en
*
* This header must be placed in the beginning of any version of this file.
*/

package eas.users.demos.rocketMan;

import java.awt.Color;

import eas.math.geometry.Polygon2D;
import eas.math.geometry.Vector2D;
import eas.simulation.spatial.sim2D.standardAgents.AbstractAgent2D;
import eas.simulation.spatial.sim2D.standardEnvironments.AbstractEnvironment2D;
import eas.startSetup.ParCollection;

/**
* @author Lukas König
*
*/
public class MazeAgent1 extends AbstractAgent2D<AbstractEnvironment2D<?>> {

    /**
     *
     */
    private static final long serialVersionUID = 4756876457664467339L;

    /**
     * @param id
     * @param env
     */
    public MazeAgent1(int id, AbstractEnvironment2D<AbstractAgent2D<?>> env, ParCollection params) {
        super(id, env, params);
    }

    private Polygon2D pol;

    @Override
    public synchronized Polygon2D getAgentShape() {
        // Auto-generated polygon code by Arrow Master (60 points)
        if (pol == null) {
            pol = new Polygon2D();
            pol.add(new Vector2D(49.0, 208.0));
            pol.add(new Vector2D(68.0, 208.0));
            pol.add(new Vector2D(111.0, 189.0));
            pol.add(new Vector2D(152.0, 207.0));
            pol.add(new Vector2D(203.0, 207.0));
            pol.add(new Vector2D(203.0, 185.0));
            pol.add(new Vector2D(259.0, 185.0));
            pol.add(new Vector2D(259.0, 207.0));
            pol.add(new Vector2D(307.0, 207.0));
            pol.add(new Vector2D(301.0, 196.0));
            pol.add(new Vector2D(358.0, 152.0));
            pol.add(new Vector2D(415.0, 191.0));
            pol.add(new Vector2D(399.0, 255.0));
            pol.add(new Vector2D(380.0, 255.0));
            pol.add(new Vector2D(380.0, 287.0));
            pol.add(new Vector2D(463.0, 252.0));
            pol.add(new Vector2D(451.0, 236.0));
            pol.add(new Vector2D(453.0, 209.0));
            pol.add(new Vector2D(468.0, 195.0));
            pol.add(new Vector2D(494.0, 184.0));
            pol.add(new Vector2D(522.0, 182.0));
            pol.add(new Vector2D(549.0, 190.0));
            pol.add(new Vector2D(566.0, 203.0));
            pol.add(new Vector2D(584.0, 196.0));
            pol.add(new Vector2D(577.0, 180.0));
            pol.add(new Vector2D(623.0, 145.0));
            pol.add(new Vector2D(655.0, 176.0));
            pol.add(new Vector2D(656.0, 226.0));
            pol.add(new Vector2D(655.7754285714292, 295));
            pol.add(new Vector2D(673.7565714285713, 295));
            pol.add(new Vector2D(674.8142857142856, 364));
            pol.add(new Vector2D(629.3325714285713, 364));
            pol.add(new Vector2D(573.2737142857147, 514));
            pol.add(new Vector2D(499.2337142857143, 514));
            pol.add(new Vector2D(488.6565714285714, 496.8231428571429));
            pol.add(new Vector2D(361.7308571428572, 496.8231428571431));
            pol.add(new Vector2D(361.7308571428572, 479.89971428571437));
            pol.add(new Vector2D(173.4577142857146, 480.9574285714283));
            pol.add(new Vector2D(168.1691428571429, 494));
            pol.add(new Vector2D(101.53314285714286, 494));
            pol.add(new Vector2D(84.60971428571423, 437.5911428571429));
            pol.add(new Vector2D(130.09142857142862, 409.0328571428571));
            pol.add(new Vector2D(178.7462857142859, 435.4757142857144));
            pol.add(new Vector2D(175.57314285714276, 447));
            pol.add(new Vector2D(210.47771428571417, 447));
            pol.add(new Vector2D(209.42000000000004, 358));
            pol.add(new Vector2D(160.76514285714293, 358));
            pol.add(new Vector2D(139.61085714285713, 379.4168571428571));
            pol.add(new Vector2D(109.99485714285714, 391));
            pol.add(new Vector2D(77.20571428571428, 388));
            pol.add(new Vector2D(60.28228571428571, 373.0705714285714));
            pol.add(new Vector2D(51.82057142857143, 350.8585714285715));
            pol.add(new Vector2D(48.647428571428605, 324.4157142857143));
            pol.add(new Vector2D(48.64742857142859, 208));
            pol.add(new Vector2D(31, 208));
            pol.add(new Vector2D(31, 525));
            pol.add(new Vector2D(682, 525));
            pol.add(new Vector2D(682, 134));
            pol.add(new Vector2D(31, 134));
            pol.add(new Vector2D(31, 208));
            pol.translateRootPointToMiddle();
        }
       
        return pol;
    }
   
    @Override
    public Color getAgentColor() {
        return Color.blue;
    }
}
TOP

Related Classes of eas.users.demos.rocketMan.MazeAgent1

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.