|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrobocode.Mine
public class Mine
Represents a Mine that is returned when placing one with Ship.placeMine(double)
and all Mine related events
| Constructor Summary | |
|---|---|
Mine(double x,
double y,
double power,
String ownerName,
String victimName,
boolean isActive,
int mineId)
Called by the game to create a new Mine object |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
String |
getName()
Returns the name of the ship that placed this mine. |
double |
getPower()
Returns the power of this mine. |
String |
getVictim()
Returns the name of the ship that this mine hit, or null if
the mine has not hit a ship. |
double |
getX()
Returns the X position of the mine. |
double |
getY()
Returns the Y position of the mine. |
int |
hashCode()
|
boolean |
isActive()
Checks if this mine is still active on the battlefield. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Mine(double x,
double y,
double power,
String ownerName,
String victimName,
boolean isActive,
int mineId)
Mine object
x - the X position of the mine.y - the Y position of the mine.power - the power of the mine.ownerName - the name of the owner ship that owns the mine.victimName - the name of the ship hit by the mine.isActive - true if the mine is not exploding; false otherwise.mineId - unique id of mine for owner robot.| Method Detail |
|---|
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String getName()
public double getPower()
public String getVictim()
null if
the mine has not hit a ship.
null if
the mine has not hit a ship.public double getX()
public double getY()
public boolean isActive()
true if the mine is still active on the battlefield;
false otherwise
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||