001/*
002 * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
003 * Copyright (C) 2000-2011 The Gridarta Developers.
004 *
005 * This program is free software; you can redistribute it and/or modify
006 * it under the terms of the GNU General Public License as published by
007 * the Free Software Foundation; either version 2 of the License, or
008 * (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU General Public License for more details.
014 *
015 * You should have received a copy of the GNU General Public License along
016 * with this program; if not, write to the Free Software Foundation, Inc.,
017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
018 */
019
020package net.sf.gridarta.model.archetype;
021
022import net.sf.gridarta.model.anim.AnimationObjects;
023import net.sf.gridarta.model.face.FaceObjectProviders;
024import net.sf.gridarta.model.gameobject.TestGameObject;
025import net.sf.gridarta.model.maparchobject.TestMapArchObject;
026import org.jetbrains.annotations.NotNull;
027
028/**
029 * An {@link Archetype} implementation for testing purposes.
030 * @author Andreas Kirschbaum
031 */
032public class TestDefaultArchetype extends AbstractArchetype<TestGameObject, TestMapArchObject, TestArchetype> implements TestArchetype {
033
034    /**
035     * The serial version UID.
036     */
037    private static final long serialVersionUID = 1L;
038
039
040    /**
041     * The return value of {@link #usesDirection()}.
042     */
043    private boolean usesDirection;
044
045    /**
046     * Creates a new instance.
047     * @param archetypeName the name of the base archetype
048     * @param faceObjectProviders the face object providers for looking up
049     * faces
050     * @param animationObjects the animation objects for looking up animations
051     */
052    public TestDefaultArchetype(@NotNull final String archetypeName, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects) {
053        super(archetypeName, faceObjectProviders, animationObjects);
054    }
055
056    /**
057     * {@inheritDoc}
058     */
059    @NotNull
060    @Override
061    public TestArchetype clone() {
062        return super.clone();
063    }
064
065    /**
066     * {@inheritDoc}
067     */
068    @Override
069    public boolean usesDirection() {
070        return usesDirection;
071    }
072
073    /**
074     * {@inheritDoc}
075     */
076    @Override
077    public void setUsesDirection(final boolean usesDirection) {
078        this.usesDirection = usesDirection;
079    }
080
081    /**
082     * {@inheritDoc}
083     */
084    @NotNull
085    @Override
086    protected TestArchetype getThis() {
087        return this;
088    }
089
090    /**
091     * {@inheritDoc}
092     */
093    @Override
094    public boolean isUndefinedArchetype() {
095        return false;
096    }
097
098}