Class Move
java.lang.Object
it.polimi.ingsw.Server.Controller.Move
Move declaration, composed of list of coordinates and Shelf column
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
place()
Places taken cards in the Player's Libraryvoid
Restores taken cards on the Board (when Move was Invalid)void
setBoardAndShelf
(Board board, Shelf shelf) Sets Move's Board and Shelfboolean
take()
Takes card from Board
-
Field Details
-
column
@Expose private int column -
orderedCards
-
x
-
y
-
board
-
shelf
-
-
Constructor Details
-
Move
Game's Move implementation- Parameters:
column
- Library's columnx
- List of Move coordinates (x)y
- List of Move coordinates (y)board
- Game's Boardshelf
- Player's Shelf
-
-
Method Details
-
setBoardAndShelf
Sets Move's Board and Shelf- Parameters:
board
- Game's Boardshelf
- Player's Shelf
-
take
public boolean take()Takes card from Board- Returns:
- action validity
-
restoreTaken
Restores taken cards on the Board (when Move was Invalid)- Throws:
Exception
- related to Model management
-
place
public boolean place()Places taken cards in the Player's Library- Returns:
- action validity
-