Class MoveIntermediate
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
it.polimi.ingsw.Server.Controller.MoveIntermediate
- All Implemented Interfaces:
MoveIntermediateInterface
,Serializable
,Remote
Intermediate for RMI Turn management, to simplify multiple games management
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Board
Game's boardprivate int
Shelf's columnprivate final GameController
Game's controllerprivate final Player
Used for validation checksprivate final Shelf
Player's shelfList of move's coordinates (x)List of move's coordinates (y)Fields inherited from class java.rmi.server.RemoteObject
ref
-
Constructor Summary
ConstructorDescriptionMoveIntermediate
(Board b, Shelf s, GameController gc, Player p) Move Intermediate constructor -
Method Summary
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
Field Details
-
b
Game's board -
s
Player's shelf -
p
Used for validation checks -
gc
Game's controller -
x
List of move's coordinates (x) -
y
List of move's coordinates (y) -
column
private int columnShelf's column
-
-
Constructor Details
-
MoveIntermediate
Move Intermediate constructor- Parameters:
b
- Game's boards
- Player's shelfgc
- Game's controllerp
- Player, used for validity check- Throws:
RemoteException
- related to RMI
-
-
Method Details
-
setParameters
Move parameters- Specified by:
setParameters
in interfaceMoveIntermediateInterface
- Parameters:
x
- list of coordinates (x)y
- list of coordinates (y)column
- in the Player's shelf
-
make
Move's creation and confirmation- Specified by:
make
in interfaceMoveIntermediateInterface
- Returns:
- validity of the move
- Throws:
Exception
- related to Shelf and Board management
-