Class ChestUpdate

java.lang.Object
it.polimi.ingsw.model.updatecontainers.ChestUpdate
All Implemented Interfaces:
ModelUpdate

public class ChestUpdate
extends java.lang.Object
implements ModelUpdate
A model update represents an update happened in a chest. Model updates contain information to notify clients or views of an update happened on the model
  • Constructor Summary

    Constructors
    Constructor Description
    ChestUpdate​(ResourceType resourceType, int quantity)  
  • Method Summary

    Modifier and Type Method Description
    int getQuantity()
    returns the new quantity value of the updated resource type
    ResourceType getResourceType()
    returns the resource type that has changed quantity

    Methods inherited from class java.lang.Object

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

    • ChestUpdate

      public ChestUpdate​(ResourceType resourceType, int quantity)
  • Method Details

    • getResourceType

      public ResourceType getResourceType()
      returns the resource type that has changed quantity
      Returns:
      the resource type that has changed quantity
    • getQuantity

      public int getQuantity()
      returns the new quantity value of the updated resource type
      Returns:
      the new quantity value of the updated resource type