All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.thehilikus.jrobocom.events.RobotAddedEvent Maven / Gradle / Ivy

There is a newer version: 1.0.0-beta-02
Show newest version
package com.github.thehilikus.jrobocom.events;

import java.awt.Point;

import com.github.thehilikus.jrobocom.robot.Robot;

/**
 * Event created when a new robot enters the game
 * 
 * @author hilikus
 */
public class RobotAddedEvent extends RobotEvent {

    private static final long serialVersionUID = 3701263690126469309L;
    private Point coordinates;

    /**
     * Main constructor
     * 
     * @param newRobot robot just added to the game
     * @param pCoordinates location of the new robot
     */
    public RobotAddedEvent(Robot newRobot, Point pCoordinates) {
	super(newRobot);
	coordinates = pCoordinates;
    }

    /**
     * @return the X, Y coordinates where the new robot was added
     */
    public Point getCoordinates() {
	return coordinates;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy