Interface IStrategie

All Known Implementing Classes:
DonnantDonnant, DonnantDonnantDur, Gentille, Mechante, Mefiante, PerGentille, PerMechant, Rancuniere, Strategie

public interface IStrategie
This interface allows to create object which can represent a players or others in a tournament or during games. This interface was created for a french university project in order to respect the Design Pattern Strategy.
Since:
2.0
See Also:
Cloneable
  • Method Summary

    Modifier and Type Method Description
    void clear()
    Reset all the attributes of the strategie
    java.lang.String getDescription()
    Give the description
    java.lang.String getNom()
    Return the name of the strategie
    java.lang.String getPlay()
    Give the action played at the current round
    void play()
    Launch and save the action played by the strategie
    void setOppPlay​(java.lang.String value)
    Add the action played by the opponent at the current round
    void setPlay​(java.lang.String play)
    Change the action played by the strategie
  • Method Details

    • getNom

      java.lang.String getNom()
      Return the name of the strategie
      Returns:
      String Name of strategie
    • getDescription

      java.lang.String getDescription()
      Give the description
      Returns:
      String Description of the strategie
      See Also:
      IStrategie
    • play

      void play()
      Launch and save the action played by the strategie
    • getPlay

      java.lang.String getPlay()
      Give the action played at the current round
      Returns:
      String The action played by the strategie
    • setPlay

      void setPlay​(java.lang.String play)
      Change the action played by the strategie
      Parameters:
      play - New action played
    • clear

      void clear()
      Reset all the attributes of the strategie
    • setOppPlay

      void setOppPlay​(java.lang.String value)
      Add the action played by the opponent at the current round
      Parameters:
      value - Action played by the opponent