|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPartita
public class Partita
Rappresenta una partita a Tris.
Constructor Summary | |
---|---|
Partita(String nomePartita,
Giocatore giocatoreCroce,
Giocatore giocatoreCerchio)
Crea una nuova partita a Tris tra due giocatori. |
Method Summary | |
---|---|
boolean |
esegui(Mossa mossa)
Esegue una mossa. |
boolean |
finita()
Controlla se la partita è finita. |
Giocatore |
getGiocatoreCerchio()
Restituisce un riferimento al giocatore "Cerchio" |
Giocatore |
getGiocatoreCroce()
Restituisce un riferimento al giocatore "Croce" |
Giocatore |
getGiocatoreDiTurno()
Restituisce un riferimento al giocatore di turno. |
String |
getNome()
Restituisce il nome della partita |
String |
getSimboloGiocatoreDiTurno()
Restituisce il simbolo del giocatore di turno. |
String |
nomeVincitore()
Restituisce il nome del vincitore. |
boolean |
patta()
Controlla se la partita è patta. |
String |
showScacchiera()
Mostra la scacchiera sottoforma di stringa stampabile. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Partita(String nomePartita, Giocatore giocatoreCroce, Giocatore giocatoreCerchio)
nomePartita
- il nome del matchgiocatoreCroce
- giocatore che avrà come simbolo Simbolo.CROCEgiocatoreCerchio
- giocatore che avrà come simbolo Simbolo.CERCHIOMethod Detail |
---|
public boolean esegui(Mossa mossa)
public boolean finita()
public Giocatore getGiocatoreCerchio()
public Giocatore getGiocatoreCroce()
public Giocatore getGiocatoreDiTurno()
public String getNome()
public String getSimboloGiocatoreDiTurno()
public String nomeVincitore()
public boolean patta()
public String showScacchiera()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |