Class Block

  • All Implemented Interfaces:
    RawObj

    public class Block
    extends Object
    implements RawObj
    A Block of the Board
    • Constructor Detail

      • Block

        public Block​(String block,
                     String owner,
                     String color)
        Block Constructor
        Parameters:
        block - type block
        owner - block owner
        color - block color
      • Block

        public Block​(Block toClone)
        Block Constructor from another Block
        Parameters:
        toClone - block to clone
    • Method Detail

      • getRawData

        public List<String> getRawData()
        Description copied from interface: RawObj
        Convert data to a list of string that contains a user readable information about the class
        Specified by:
        getRawData in interface RawObj
        Returns:
        data converted into an array of string user readable information about the class
      • getTypeBlock

        public String getTypeBlock()
        Get block type
        Returns:
        block type
      • getOwner

        public String getOwner()
        Get block owner
        Returns:
        block owner, if it is not a worker is null
      • getColor

        public String getColor()
        Get block color
        Returns:
        block color, if it is not a worker is null