Module AM37

Class MoveAction

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

public class MoveAction
extends Action
Describes and manages a movement action
  • Field Summary

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

    targetCell, targetWorker
  • Constructor Summary

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

    Modifier and Type Method Description
    void apply()
    Forces an action to be applied
    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
  • Constructor Details

    • MoveAction

      public MoveAction​(Worker targetWorker, Cell targetCell)
      Default constructor
      Parameters:
      targetWorker - the worker to be moved
      targetCell - the cell to move the worker to
  • Method Details