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

com.github.thehilikus.jrobocom.events.RobotRemovedEvent 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 robot is removed from the game
 * 
 * @author hilikus
 */
public class RobotRemovedEvent extends RobotEvent {

    private static final long serialVersionUID = 8962044780427247123L;
    private Point lastPosition;

    /**
     * Main constructor
     * 
     * @param robot robot removed
     * @param pLastPosition last coordinates of the robot
     */
    public RobotRemovedEvent(Robot robot, Point pLastPosition) {
	super(robot);

	lastPosition = pLastPosition;
    }

    /**
     * @return the last known position of the robot
     */
    public Point getCoordinates() {
	return lastPosition;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy