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 voidclear()Reset all the attributes of the strategiejava.lang.StringgetDescription()Give the descriptionjava.lang.StringgetNom()Return the name of the strategiejava.lang.StringgetPlay()Give the action played at the current roundvoidplay()Launch and save the action played by the strategievoidsetOppPlay(java.lang.String value)Add the action played by the opponent at the current roundvoidsetPlay(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
-