Module AM37

Class BuildAction

java.lang.Object
it.polimi.ingsw.model.action.Action
it.polimi.ingsw.model.action.BuildAction

public class BuildAction
extends Action
Describes and manages a build action
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected Block targetBlock  

    Fields inherited from class it.polimi.ingsw.model.action.Action

    targetCell, targetWorker
  • Constructor Summary

    Constructors 
    Constructor Description
    BuildAction​(Worker targetWorker, Cell targetCell, Block targetBlock)
    Default constructor
  • Method Summary

    Modifier and Type Method Description
    void apply()
    Forces an action to be applied
    Block getTargetBlock()
    targetBlock getter
    void getValidation​(Game game)
    Checks if the action can be performed, based on the game status

    Methods inherited from class it.polimi.ingsw.model.action.Action

    getStartingCell, getTargetCell, getTargetWorker

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • BuildAction

      public BuildAction​(Worker targetWorker, Cell targetCell, Block targetBlock)
      Default constructor
      Parameters:
      targetWorker - the worker performing the action
      targetCell - the cell to build on
      targetBlock - the block to build on the target cell
  • Method Details