|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmuehle.logic.Action
muehle.logic.MoveAction
public class MoveAction
Diese Klasse implementiert eine Schiebe-Aktion. Sie führt das Schieben eines Steines auf dem Spielfeld durch.
| Field Summary | |
|---|---|
protected int |
source
Das Ursprungsfeld, von dem der Stein weggeschoben wird |
| Fields inherited from class muehle.logic.Action |
|---|
destination, player, undoAction |
| Constructor Summary | |
|---|---|
MoveAction()
|
|
MoveAction(Player p,
int destination,
int source)
Der Konstruktor erzeugt die MoveAction entsprechend dem Super-Konstruktor einer allgemeinen Aktion. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
überprüft, ob die übergeben Move-Action gleich dieser Move-Action ist. |
int |
getActionValue()
gibt die Veränderung des Action-Values zurück, die durch die MoveAktion entsteht. |
int |
getSource()
Gibt die Position zurück, an der der Stein vor dem Verschieben lag. |
void |
setSource(int source)
|
java.lang.String |
toNetString()
gibt eine String-Darstellung der Move-Aktion für das Netzwerkprotokoll zurück im Format x,y,z,X,Y,Z wobei erst das Ziel und dann der Ursprung angeben wird |
java.lang.String |
toString()
gibt eine String-Darstellung der Move-Aktion der Aktion für das Status-Panel zurück im Format Schiebezug: x,y,z => X,Y,Z wobei erst das Ziel und dann der Ursprung angeben wird |
| Methods inherited from class muehle.logic.Action |
|---|
getDestination, getPlayer, getStone, getUndoAction, setDestination, setPlayer |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int source
| Constructor Detail |
|---|
public MoveAction()
public MoveAction(Player p,
int destination,
int source)
p - Spieler, dessen Stein verschoben wird.destination - Position, an die geschoben werden sollsource - Position, an der sich der Stein vorher befindet| Method Detail |
|---|
public int getSource()
public java.lang.String toNetString()
toNetString in class Actionpublic java.lang.String toString()
toString in class Actionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - Move-Action
public int getActionValue()
getActionValue in class Actionpublic void setSource(int source)
source - The source to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||