public interface Command
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.
|
void setFromCoordinates(int fromX, int fromY)
fromX
- x coordinate of mousefromY
- y coordinate of mousevoid setToCoordinates(int toX, int toY)
toX
- x coordinate of mousetoY
- y coordinate of mouseboolean execute()
From the book: Flexible, Reliable Software, © CRC Press 2010. Author: Henrik B. Christensen, Aarhus University, Denmark