forked from IF-LK-2020/wordle
source dir
added package declaration removed package declaration ist doch nicht nötig
This commit is contained in:
112
src/User.java
Normal file
112
src/User.java
Normal file
@@ -0,0 +1,112 @@
|
||||
/**
|
||||
* Beschreiben Sie hier die Klasse User.
|
||||
*
|
||||
* @author (Ihr Name)
|
||||
* @version (eine Versionsnummer oder ein Datum)
|
||||
*/
|
||||
public class User
|
||||
{
|
||||
// Instanzvariablen - ersetzen Sie das folgende Beispiel mit Ihren Variablen
|
||||
private String name;
|
||||
private String password;
|
||||
private int timesPlayed;
|
||||
private int winPercentage;
|
||||
private int currentStreak;
|
||||
private int maxStreak;
|
||||
private int[] wonInTurn;
|
||||
|
||||
/**
|
||||
* Konstruktor für Objekte der Klasse User
|
||||
*/
|
||||
public User()
|
||||
{
|
||||
// Instanzvariable initialisieren
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Ein Beispiel einer Methode - ersetzen Sie diesen Kommentar mit Ihrem eigenen
|
||||
*
|
||||
* @param y ein Beispielparameter für eine Methode
|
||||
* @return die Summe aus x und y
|
||||
*/
|
||||
public void setPassword(String password)
|
||||
{
|
||||
// tragen Sie hier den Code ein
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
// tragen Sie hier den Code ein
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setTimesPlayed(int timesPlayed)
|
||||
{
|
||||
// tragen Sie hier den Code ein
|
||||
this.timesPlayed = timesPlayed;
|
||||
}
|
||||
|
||||
public int getTimesPlayed()
|
||||
{
|
||||
return timesPlayed;
|
||||
}
|
||||
|
||||
public void setwinPercentage(int winPercentage)
|
||||
{
|
||||
// tragen Sie hier den Code ein
|
||||
this.winPercentage = winPercentage;
|
||||
}
|
||||
|
||||
public int getWinPercentage()
|
||||
{
|
||||
return winPercentage;
|
||||
}
|
||||
|
||||
public void setCurrentStreak(int currentStreak)
|
||||
{
|
||||
// tragen Sie hier den Code ein
|
||||
this.currentStreak = currentStreak;
|
||||
}
|
||||
|
||||
public int getCurrentStreak()
|
||||
{
|
||||
return currentStreak;
|
||||
}
|
||||
|
||||
public void setMaxStreak(int maxStreak)
|
||||
{
|
||||
// tragen Sie hier den Code ein
|
||||
this.maxStreak = maxStreak;
|
||||
}
|
||||
|
||||
public int getMaxStreak()
|
||||
{
|
||||
return maxStreak;
|
||||
}
|
||||
|
||||
public void setWonInTurn(int[] wonInTurn)
|
||||
{
|
||||
this.wonInTurn = wonInTurn;
|
||||
}
|
||||
|
||||
public int getWonInTurn(int turn)
|
||||
{
|
||||
int temp = wonInTurn[turn];
|
||||
return temp;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user