package gizmoball.game;

import org.apache.log4j.Logger;
import physics.*;

/**
 * The gizmo representing the outer walls.  This is a rectangle that
 * surrounds the entire board and keeps the ball on it.
 *
 * @author <a href="mailto:amdragon@mit.edu">Austin Clements</a>
 * @version $Id: OuterWallsGizmo.java,v 1.4 2004/04/27 08:06:29 amthrax Exp $
 */
public class OuterWallsGizmo extends AbstractGizmoWithPolygonalGeometry {
    private Vect dimensions;
    
    private static Logger logger = Logger.getLogger(OuterWallsGizmo.class);

    /**
     * Creates a new <code>OuterWallsGizmo</code> instance.
     */
    public OuterWallsGizmo(Vect dimensions) {
        super("Outer walls", Vect.ZERO);

        Vect[] geometry = new Vect[]
            {
                Vect.ZERO, new Vect(dimensions.x(), 0), dimensions,
                new Vect(0, dimensions.y())
            };
        
        setGeometry(geometry, Vect.ZERO);
        this.dimensions = dimensions;
    }

    /**
     * Get the dimensions of the outer walls, as passed to the
     * constructor
     *
     * @return the dimensions of this gizmo
     */
    public Vect getDimensions() {
        return dimensions;
    }

    /**
     * Does nothing.
     */
    public boolean tick(double time) {
        return false;
    }

    /**
     * Fire the bumpers's trigger.  Does nothing.
     */
    public void fireTrigger(AbstractTrigger trigger) {
        return;
    }
}

