diff --git a/User.java b/User.java index 4d85310..0aa7c8f 100644 --- a/User.java +++ b/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; + } + } diff --git a/package.bluej b/package.bluej index c6c4b93..f6022ac 100755 --- a/package.bluej +++ b/package.bluej @@ -20,10 +20,10 @@ dependency6.type=UsesDependency dependency7.from=Game dependency7.to=DatabaseConnector dependency7.type=UsesDependency -editor.fx.0.height=722 -editor.fx.0.width=800 -editor.fx.0.x=346 -editor.fx.0.y=91 +editor.fx.0.height=1017 +editor.fx.0.width=854 +editor.fx.0.x=-7 +editor.fx.0.y=0 objectbench.height=96 objectbench.width=1201 package.divider.horizontal=0.6 @@ -59,19 +59,19 @@ target2.width=120 target2.x=110 target2.y=80 target3.height=70 -target3.name=User +target3.name=Game target3.showInterface=false target3.type=ClassTarget target3.width=120 -target3.x=770 -target3.y=50 +target3.x=960 +target3.y=30 target4.height=70 -target4.name=Game +target4.name=User target4.showInterface=false target4.type=ClassTarget target4.width=120 -target4.x=960 -target4.y=30 +target4.x=770 +target4.y=50 target5.height=70 target5.name=Server target5.showInterface=false @@ -87,23 +87,23 @@ target6.width=120 target6.x=540 target6.y=210 target7.height=70 -target7.name=List +target7.name=GUI target7.showInterface=false target7.type=ClassTarget -target7.width=140 -target7.x=390 -target7.y=380 +target7.width=120 +target7.x=630 +target7.y=80 target8.height=70 -target8.name=GUI +target8.name=List target8.showInterface=false target8.type=ClassTarget -target8.width=120 -target8.x=630 -target8.y=80 +target8.width=150 +target8.x=390 +target8.y=380 target9.height=60 target9.name=Queue target9.showInterface=false target9.type=ClassTarget -target9.width=120 +target9.width=160 target9.x=80 target9.y=380 diff --git a/umlet.uxf b/umlet.uxf index ccc0845..1556d93 100644 --- a/umlet.uxf +++ b/umlet.uxf @@ -1,13 +1,13 @@ - 9 + 12 UMLClass - 648 - 198 - 90 - 27 + 636 + 144 + 120 + 36 Server @@ -15,10 +15,10 @@ UMLClass - 648 - 315 - 90 - 27 + 636 + 300 + 120 + 36 WordleServer @@ -27,9 +27,9 @@ Relation 684 - 216 - 27 - 117 + 168 + 36 + 156 lt=<<- 10.0;10.0;10.0;110.0 @@ -37,10 +37,10 @@ UMLClass - 171 - 405 - 261 - 351 + 0 + 420 + 348 + 468 User -- @@ -53,7 +53,7 @@ -maxStreak: int -wonInTurn: int[] -- -+setPassword(String pw): void ++setPassword(String password): void +getPassword(): String +setName(String name): void +getName(): String @@ -72,10 +72,10 @@ UMLClass - 306 - 297 - 126 - 27 + 180 + 276 + 168 + 36 DatabaseConnector @@ -84,9 +84,9 @@ Relation 684 - 333 - 108 - 90 + 324 + 144 + 120 lt=<. -wordleServer @@ -95,10 +95,10 @@ UMLClass - 558 - 405 - 270 - 99 + 516 + 420 + 360 + 132 Game -- @@ -113,10 +113,10 @@ UMLClass - 936 - 405 - 216 - 63 + 1020 + 420 + 288 + 84 GUI -- @@ -127,10 +127,10 @@ UMLClass - 252 - 207 - 90 - 27 + 108 + 156 + 120 + 36 QueryResult @@ -138,10 +138,10 @@ Relation - 423 - 396 - 153 - 36 + 336 + 408 + 204 + 48 lt=<. -user @@ -150,10 +150,10 @@ Relation - 819 - 396 - 135 - 36 + 864 + 408 + 180 + 48 lt=<. -gui @@ -162,10 +162,10 @@ Relation - 423 - 297 - 198 - 126 + 336 + 276 + 264 + 168 lt=<. -databaseConnector @@ -174,10 +174,10 @@ UMLClass - 936 - 90 - 216 - 225 + 1020 + 0 + 288 + 300 Letter -- @@ -196,10 +196,10 @@ GREEN: byte = 2 Relation - 1035 - 306 - 117 - 117 + 1152 + 288 + 156 + 156 lt=<. -letters: Letter[][]