/***********************************************************************

GECCO, a platform for command and control gaming

Copyright (C) 2001 Henrik Bäärnhielm, Andreas Enblom, Niklas
Hallenfur, Karl Hasselström, Henrik Hägerström, Oskar Linde, Jing Fu
Zi and Jon Åslund

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.

***********************************************************************/

package gecco.server.qmanager;

import gecco.server.automaton.*;

/**
 *  This class encapsulates data about an AutomatonEvent in the queue of the
 *  server. The data consists of the AutomatonEvent instance and the coordinates
 *  of the automaton to be affected.
 *
 * @author     Henrik Bäärnhielm, Karl Hasselström, Henrik Hägerström
 * @created    May 2, 2001
 */
public class QueuedEvent {
    /**
     *  Description of the Field
     */
    private AutomatonEvent theEvent;
    /**
     *  Description of the Field
     */
    private int x;
    /**
     *  Description of the Field
     */
    private int y;


    /**
     *  Constructor for the QueuedEvent object
     *
     * @param  theEvent  The event to be queued.
     * @param  x         The x coordinate of the automaton to be affected
     * @param  y         The y coordinate of the automaton to be affected
     */
    public QueuedEvent(AutomatonEvent theEvent, int x, int y) {
        this.x = x;
        this.y = y;
        this.theEvent = theEvent;
    }


    /**
     *  Gets the x coordinate of the automaton to be affected
     *
     * @return    The x coordinate
     */
    public int getX() {
        return x;
    }


    /**
     *  Gets the y coordinate of the automaton to be affected
     *
     * @return    The y coordinate
     */
    public int getY() {
        return y;
    }


    /**
     *  Gets the queued AutomatonEvent instance
     *
     * @return    The AutomatonEvent
     */
    public AutomatonEvent getAutomatonEvent() {
        return theEvent;
    }
}


