Class Player
java.lang.Object
Player
Classe che rappresenta un giocatore con le relative statistiche e informazioni.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRestituisce il colore del giocatore.getNome()Restituisce il nome del giocatore.intRestituisce le partite pareggiate del giocatore.intRestituisce le partite perse del giocatore.intRestituisce le partite vinte del giocatore.voidImposta il colore per il giocatore.voidImposta un nuovo nome per il giocatore.voidsetPartitePareggiate(int partitePareggiate) Imposta le partite pareggiate per il giocatore.voidsetPartitePerse(int partitePerse) Imposta le partite perse per il giocatore.voidsetPartiteVinte(int partiteVinte) Imposta le partite vinte per il giocatore.toString()Restituisce una rappresentazione testuale formattata del giocatore.
-
Constructor Details
-
Player
Costruttore per creare un nuovo giocatore.- Parameters:
nome- Nome del giocatorecolore- Colore assegnato al giocatore
-
-
Method Details
-
getNome
Restituisce il nome del giocatore. -
setNome
Imposta un nuovo nome per il giocatore. -
getPartiteVinte
public int getPartiteVinte()Restituisce le partite vinte del giocatore. -
setPartiteVinte
public void setPartiteVinte(int partiteVinte) Imposta le partite vinte per il giocatore. -
getColore
Restituisce il colore del giocatore. -
setColore
Imposta il colore per il giocatore. -
getPartitePerse
public int getPartitePerse()Restituisce le partite perse del giocatore. -
setPartitePerse
public void setPartitePerse(int partitePerse) Imposta le partite perse per il giocatore. -
getPartitePareggiate
public int getPartitePareggiate()Restituisce le partite pareggiate del giocatore. -
setPartitePareggiate
public void setPartitePareggiate(int partitePareggiate) Imposta le partite pareggiate per il giocatore. -
toString
Restituisce una rappresentazione testuale formattata del giocatore.
-