Package reversi

Enum Class Couleurcase

All Implemented Interfaces:
Serializable, Comparable<Couleurcase>, Constable

public enum Couleurcase extends Enum<Couleurcase>
Énumération représentant les états possibles d'une case sur le plateau de Reversi. Chaque case peut être vide, occupée par un pion blanc, ou occupée par un pion noir.
  • Enum Constant Details

    • VIDE

      public static final Couleurcase VIDE
      Case vide (sans pion).
    • BLANC

      public static final Couleurcase BLANC
      Case occupée par un pion blanc.
    • NOIR

      public static final Couleurcase NOIR
      Case occupée par un pion noir.
  • Method Details

    • values

      public static Couleurcase[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Couleurcase valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • oppose

      public Couleurcase oppose()
      Retourne la couleur opposée à la couleur actuelle. Utile pour déterminer le joueur adverse.
      Returns:
      La couleur opposée : - BLANC → NOIR - NOIR → BLANC - VIDE → VIDE (aucune opposition pour une case vide)