Class Graine

All Implemented Interfaces:
Serializable

public class Graine extends ObjetSurCarteAId implements Serializable
See Also:
  • Field Details

    • givenFood

      private int givenFood
    • hardness

      private byte hardness
    • ouverte

      private boolean ouverte
    • type

      private byte type
    • tempsAvantDecomposition

      private byte tempsAvantDecomposition
  • Constructor Details

    • Graine

      public Graine(CCase ccase, int givenFood, byte hardness)
    • Graine

      public Graine(CCase ccase)
    • Graine

      public Graine()
  • Method Details

    • getGivenFood

      public int getGivenFood()
    • setGivenFood

      public void setGivenFood(int x)
    • getHardness

      public byte getHardness()
    • setHardness

      public void setHardness(byte x)
    • setHardness

      public void setHardness(int x)
    • getOuverte

      public boolean getOuverte()
    • isOpen

      public boolean isOpen()
    • setOpen

      public void setOpen(boolean b)
    • setOuverte

      public void setOuverte(boolean b)
    • casser

      public void casser()
    • canBeOpenBy

      public boolean canBeOpenBy(Creature c)
      Return true if it can be open by given Creature.
      o
    • setCCase

      public void setCCase(CCase newCCase)
      Move the Graine from a case to an other.
      o It is used by Deplacement interfaces.
      It wil try to remove from old CCase and add to new CCase.
      Overrides:
      setCCase in class ObjetSurCarteAId
    • getType

      public byte getType()
    • getTimeAvantDecomposition

      public byte getTimeAvantDecomposition()
    • toString

      public String toString()
      Description copied from class: ObjetAId
      Return a string that describe this.
      Overrides:
      toString in class ObjetAId
    • equals

      public boolean equals(Object o)
      Standard equals function. Null & other class type proof.
      Overrides:
      equals in class ObjetAId
      Parameters:
      o - o is the Object to test. It can be null or something else than this class.
    • mourrir

      public void mourrir()
    • tour

      public void tour()