Class Case

java.lang.Object
com.company.gameplay.Case

public class Case
extends java.lang.Object
Une case du plateau, qui peut être libre, détruite ou occupée.
  • Field Summary

    Fields
    Modifier and Type Field Description
    private boolean detruite  
    private Joueur occupant  
    int x  
    int y  
  • Constructor Summary

    Constructors
    Constructor Description
    Case​(int x, int y)  
  • Method Summary

    Modifier and Type Method Description
    void detruire()  
    boolean estDetruite()  
    boolean estLibre()  
    Joueur getOccupant()  
    void liberer()  
    void setOccupant​(Joueur joueur)  

    Methods inherited from class java.lang.Object

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

    • occupant

      private Joueur occupant
    • detruite

      private boolean detruite
    • x

      public final int x
    • y

      public final int y
  • Constructor Details

    • Case

      public Case​(int x, int y)
  • Method Details

    • estLibre

      public boolean estLibre()
      Returns:
      true si la case n'est ni occupé ni détruite
    • estDetruite

      public boolean estDetruite()
    • detruire

      public void detruire()
    • liberer

      public void liberer()
    • setOccupant

      public void setOccupant​(Joueur joueur)
    • getOccupant

      public Joueur getOccupant()