forked from IF-LK-2020/wordle
User klasse increase fehlt
This commit is contained in:
63
User.java
63
User.java
@@ -13,7 +13,7 @@ public class User
|
||||
private int winPercentage;
|
||||
private int currentStreak;
|
||||
private int maxStreak;
|
||||
private int[] winInTurn;
|
||||
private int[] wonInTurn;
|
||||
|
||||
/**
|
||||
* Konstruktor für Objekte der Klasse User
|
||||
@@ -30,10 +30,10 @@ public class User
|
||||
* @param y ein Beispielparameter für eine Methode
|
||||
* @return die Summe aus x und y
|
||||
*/
|
||||
public void setPassword(String pW)
|
||||
public void setPassword(String password)
|
||||
{
|
||||
// tragen Sie hier den Code ein
|
||||
password = pW;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
@@ -41,10 +41,10 @@ public class User
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setName(String pN)
|
||||
public void setName(String name)
|
||||
{
|
||||
// tragen Sie hier den Code ein
|
||||
name = pN;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
@@ -52,16 +52,61 @@ public class User
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String pN)
|
||||
public void setTimesPlayed(int timesPlayed)
|
||||
{
|
||||
// tragen Sie hier den Code ein
|
||||
name = pN;
|
||||
this.timesPlayed = timesPlayed;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
public int getTimesPlayed()
|
||||
{
|
||||
return name;
|
||||
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