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

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.core;

/**
 *  This class encapsulates an event sent to a unit. Each event has a name and a
 *  factor, which can be used to indicate how "strong" the event is, or similar
 *  things.
 *
 * @author     Henrik Bäärnhielm, Karl Hasselström, Henrik Hägerström.
 * @created    April 30, 2001
 */
public class UnitEvent {

    /**
     *  Description of the Field
     */
    private int eventId;
    /**
     *  Description of the Field
     */
    private int factor;
    /**
     *  Description of the Field
     */
    private String name;

    /**
     *  Description of the Field
     */
    private static int idCounter = 0;


    /**
     *  Constructor for the UnitEvent object
     *
     * @param  _name    The name of the event.
     * @param  _factor  The factor of the event.
     */
    public UnitEvent(String _name, int _factor) {
        name = _name;
        factor = _factor;
        eventId = idCounter++;
    }


    /**
     *  Gets the name of the event.
     *
     * @return    The name.
     */
    public String getName() {
        return name;
    }


    /**
     *  Gets the factor of the event.
     *
     * @return    The factor.
     */
    public int getFactor() {
        return factor;
    }


    /**
     *  Gets the unique id that identifies this event.
     *
     * @return    The event id.
     */
    public int getEventId() {
        return eventId;
    }
}


