Constructor and Description |
---|
NullCommand() |
Modifier and Type | Method and Description |
---|---|
boolean |
execute()
execute encapsulates the method call on the board game.
|
void |
setFromCoordinates(int fromX,
int fromY)
set the coordinates of the mouse down event; where the image is moved FROM.
|
void |
setToCoordinates(int toX,
int toY)
set the coordinates of the mouse up event; where the image is moved TO.
|
public boolean execute()
Command
public void setFromCoordinates(int fromX, int fromY)
Command
setFromCoordinates
in interface Command
fromX
- x coordinate of mousefromY
- y coordinate of mousepublic void setToCoordinates(int toX, int toY)
Command
setToCoordinates
in interface Command
toX
- x coordinate of mousetoY
- y coordinate of mouseFrom the book: Flexible, Reliable Software, © CRC Press 2010. Author: Henrik B. Christensen, Aarhus University, Denmark