Class InteractiveBreaker
- java.lang.Object
-
- it.unicam.cs.pa.mastermind.players.CodeBreaker
-
- it.unicam.cs.pa.mastermind.players.InteractiveBreaker
-
public class InteractiveBreaker extends CodeBreaker
Particolare estensione diCodeBreaker
, rappresentante un utente fisico. Nello specifico l'utente umano può effettuare decisioni ed impartire comandi passando da un'istanza diGameView
.- Author:
- Francesco Pio Stelluti, Francesco Coppola
-
-
Constructor Summary
Constructors Constructor Description InteractiveBreaker(GameView newView, int seqLength)
-
Method Summary
Modifier and Type Method Description java.util.List<ColorPegs>
getAttempt()
L'utente fisico può decidere di voler reinserire una sequenza diColorPegs
già inserita precedentemente.-
Methods inherited from class it.unicam.cs.pa.mastermind.players.CodeBreaker
getLastClue, hasGivenUp, setGiveUp, setLastClue, toggleGiveUp
-
-
-
-
Constructor Detail
-
InteractiveBreaker
public InteractiveBreaker(GameView newView, int seqLength)
-
-
Method Detail
-
getAttempt
public java.util.List<ColorPegs> getAttempt()
L'utente fisico può decidere di voler reinserire una sequenza diColorPegs
già inserita precedentemente. In tal caso ripeterà l'azione di definizione di una nuova sequenza. Contratto: se dalla vistaGameView
viene restuito il valore 0 allora tale valore viene interpretato come la volontà dell'utente fisico di arrendersi.- Specified by:
getAttempt
in classCodeBreaker
- Returns:
- List contenente i
ColorPegs
validi come sequenza tentativo.
-
-