private static class ChangeSet.MoveChange extends ChangeSet.Change
| Modifier and Type | Field and Description |
|---|---|
private Tile |
newTile |
private Location |
oldLocation |
private Unit |
unit |
see| Constructor and Description |
|---|
MoveChange(ChangeSet.See see,
Unit unit,
Location oldLocation,
Tile newTile)
Build a new MoveChange.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attachToElement(org.w3c.dom.Element element)
Some changes can not be directly specialized, but need to be
directly attached to an element.
|
java.util.List<ChangeSet.Change> |
consequences(ServerPlayer serverPlayer)
There are consequences to a move.
|
int |
getPriority()
Gets the sort priority.
|
boolean |
isPerhapsNotifiable(ServerPlayer serverPlayer)
Should a player perhaps be notified of this move?
|
private boolean |
seeNew(ServerPlayer serverPlayer) |
private boolean |
seeOld(ServerPlayer serverPlayer) |
org.w3c.dom.Element |
toElement(ServerPlayer serverPlayer,
org.w3c.dom.Document doc)
Specialize a MoveChange into an "animateMove" element for a
particular player.
|
java.lang.String |
toString() |
convertsToElement, isNotifiable, matchesprivate final Unit unit
private final Location oldLocation
private final Tile newTile
public MoveChange(ChangeSet.See see, Unit unit, Location oldLocation, Tile newTile)
see - The visibility of this change.unit - The Unit that is moving.oldLocation - The location from which the unit is moving.newTile - The Tile to which the unit is moving.private boolean seeOld(ServerPlayer serverPlayer)
private boolean seeNew(ServerPlayer serverPlayer)
public int getPriority()
getPriority in class ChangeSet.Changepublic boolean isPerhapsNotifiable(ServerPlayer serverPlayer)
isPerhapsNotifiable in class ChangeSet.ChangeserverPlayer - The ServerPlayer to notify.public java.util.List<ChangeSet.Change> consequences(ServerPlayer serverPlayer)
consequences in class ChangeSet.ChangeserverPlayer - The ServerPlayer to notify.public org.w3c.dom.Element toElement(ServerPlayer serverPlayer, org.w3c.dom.Document doc)
toElement in class ChangeSet.ChangeserverPlayer - The ServerPlayer to update.doc - The owner Document.public void attachToElement(org.w3c.dom.Element element)
attachToElement in class ChangeSet.Changeelement - The Element to attach to.public java.lang.String toString()
toString in class java.lang.Object