Package it.polimi.ingsw.serializable
Class CellClient
java.lang.Object
it.polimi.ingsw.serializable.CellClient
- All Implemented Interfaces:
java.io.Serializable
public class CellClient
extends java.lang.Object
implements java.io.Serializable
Allows to represent the Cell object client-side.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description CellClient(int x, int y)CellClient(Cell observedCell) -
Method Summary
Modifier and Type Method Description voidaddWorker(WorkerClient worker)Updates worker in cell.intgetCellLevel()WorkerClientgetWorkerClient()intgetX()intgetY()booleanhasDome()booleanhasWorker()voidremoveWorker()Removes worker from cell.voidupdateBuildingCell(CellClient cellFromServer)Updates the clientCell of the view after receiving the cell from the server.
-
Constructor Details
-
CellClient
public CellClient(int x, int y) -
CellClient
-
-
Method Details
-
updateBuildingCell
Updates the clientCell of the view after receiving the cell from the server.- Parameters:
cellFromServer- cell received from the server.
-
removeWorker
public void removeWorker()Removes worker from cell. -
addWorker
Updates worker in cell.- Parameters:
worker- local workerClient instance.
-
getY
public int getY() -
getX
public int getX() -
getWorkerClient
-
hasWorker
public boolean hasWorker() -
hasDome
public boolean hasDome() -
getCellLevel
public int getCellLevel()
-