forked from IF-LK-2020/wordle
Methodenköpfe für Query und User; Objektdiagram überarbeitet
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -26,3 +26,10 @@ hs_err_pid*
|
|||||||
|
|
||||||
# Engine-Alpha files
|
# Engine-Alpha files
|
||||||
engine-alpha.log
|
engine-alpha.log
|
||||||
|
# intelliJ
|
||||||
|
/.idea/misc.xml
|
||||||
|
/.idea/modules.xml
|
||||||
|
/.idea/vcs.xml
|
||||||
|
/git.iml
|
||||||
|
/out/
|
||||||
|
/.idea/.gitignore
|
||||||
|
|||||||
22
Query.java
Normal file
22
Query.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
public class Query {
|
||||||
|
DatabaseConnector db;
|
||||||
|
|
||||||
|
Query(){
|
||||||
|
db = new DatabaseConnector("", 0, "wordle.db", "", "");
|
||||||
|
}
|
||||||
|
public void pullStats(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void pushStats(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void checkLogin(String username, String password){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWord(){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,7 +19,7 @@ public class Queue<ContentType> {
|
|||||||
|
|
||||||
/* --------- Anfang der privaten inneren Klasse -------------- */
|
/* --------- Anfang der privaten inneren Klasse -------------- */
|
||||||
|
|
||||||
private class QueueNode {
|
public class QueueNode {
|
||||||
|
|
||||||
private ContentType content = null;
|
private ContentType content = null;
|
||||||
private QueueNode nextNode = null;
|
private QueueNode nextNode = null;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public abstract class Server
|
|||||||
private NewConnectionHandler connectionHandler;
|
private NewConnectionHandler connectionHandler;
|
||||||
private List<ClientMessageHandler> messageHandlers;
|
private List<ClientMessageHandler> messageHandlers;
|
||||||
|
|
||||||
private class NewConnectionHandler extends Thread
|
public class NewConnectionHandler extends Thread
|
||||||
{
|
{
|
||||||
private ServerSocket serverSocket;
|
private ServerSocket serverSocket;
|
||||||
private boolean active;
|
private boolean active;
|
||||||
|
|||||||
96
User.java
Normal file
96
User.java
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
public class User {
|
||||||
|
int connectionID;
|
||||||
|
String username;
|
||||||
|
String password;
|
||||||
|
int timesPlayed;
|
||||||
|
int winPercentage;
|
||||||
|
int currentStreak;
|
||||||
|
int maxStreak;
|
||||||
|
int lastDayWOTDFinished;
|
||||||
|
int state;
|
||||||
|
int [] wonInTurn;
|
||||||
|
|
||||||
|
public User (int pConnectionID, Query pQuery){
|
||||||
|
connectionID =pConnectionID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getConnectionID() {
|
||||||
|
return connectionID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCurrentStreak() {
|
||||||
|
return currentStreak;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLastDayWOTDFinished() {
|
||||||
|
return lastDayWOTDFinished;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxStreak() {
|
||||||
|
return maxStreak;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTimesPlayed() {
|
||||||
|
return timesPlayed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWinPercentage() {
|
||||||
|
return winPercentage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] getWonInTurn() {
|
||||||
|
return wonInTurn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConnectionID(int connectionID) {
|
||||||
|
this.connectionID = connectionID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrentStreak(int currentStreak) {
|
||||||
|
this.currentStreak = currentStreak;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastDayWOTDFinished(int lastDayWOTDFinished) {
|
||||||
|
this.lastDayWOTDFinished = lastDayWOTDFinished;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxStreak(int maxStreak) {
|
||||||
|
this.maxStreak = maxStreak;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(int state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimesPlayed(int timesPlayed) {
|
||||||
|
this.timesPlayed = timesPlayed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWinPercentage(int winPercentage) {
|
||||||
|
this.winPercentage = winPercentage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWonInTurn(int[] wonInTurn) {
|
||||||
|
this.wonInTurn = wonInTurn;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,8 +4,8 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>UMLClass</id>
|
<id>UMLClass</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>114</x>
|
<x>294</x>
|
||||||
<y>582</y>
|
<y>366</y>
|
||||||
<w>270</w>
|
<w>270</w>
|
||||||
<h>96</h>
|
<h>96</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>UMLClass</id>
|
<id>UMLClass</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>180</x>
|
<x>360</x>
|
||||||
<y>492</y>
|
<y>276</y>
|
||||||
<w>126</w>
|
<w>126</w>
|
||||||
<h>42</h>
|
<h>42</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -41,8 +41,8 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>UMLClass</id>
|
<id>UMLClass</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>0</x>
|
<x>180</x>
|
||||||
<y>786</y>
|
<y>570</y>
|
||||||
<w>126</w>
|
<w>126</w>
|
||||||
<h>42</h>
|
<h>42</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>UMLClass</id>
|
<id>UMLClass</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>186</x>
|
<x>366</x>
|
||||||
<y>786</y>
|
<y>570</y>
|
||||||
<w>126</w>
|
<w>126</w>
|
||||||
<h>42</h>
|
<h>42</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -67,8 +67,8 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>UMLClass</id>
|
<id>UMLClass</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>180</x>
|
<x>360</x>
|
||||||
<y>390</y>
|
<y>174</y>
|
||||||
<w>126</w>
|
<w>126</w>
|
||||||
<h>42</h>
|
<h>42</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -80,8 +80,8 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>UMLClass</id>
|
<id>UMLClass</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>360</x>
|
<x>540</x>
|
||||||
<y>786</y>
|
<y>570</y>
|
||||||
<w>126</w>
|
<w>126</w>
|
||||||
<h>42</h>
|
<h>42</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -93,8 +93,8 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>Relation</id>
|
<id>Relation</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>240</x>
|
<x>420</x>
|
||||||
<y>528</y>
|
<y>312</y>
|
||||||
<w>18</w>
|
<w>18</w>
|
||||||
<h>66</h>
|
<h>66</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -104,8 +104,8 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>Relation</id>
|
<id>Relation</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>240</x>
|
<x>420</x>
|
||||||
<y>426</y>
|
<y>210</y>
|
||||||
<w>18</w>
|
<w>18</w>
|
||||||
<h>78</h>
|
<h>78</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -115,8 +115,8 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>Relation</id>
|
<id>Relation</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>240</x>
|
<x>420</x>
|
||||||
<y>750</y>
|
<y>534</y>
|
||||||
<w>18</w>
|
<w>18</w>
|
||||||
<h>48</h>
|
<h>48</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -126,8 +126,8 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>Relation</id>
|
<id>Relation</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>120</x>
|
<x>300</x>
|
||||||
<y>798</y>
|
<y>582</y>
|
||||||
<w>78</w>
|
<w>78</w>
|
||||||
<h>18</h>
|
<h>18</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -137,8 +137,8 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>Relation</id>
|
<id>Relation</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>306</x>
|
<x>486</x>
|
||||||
<y>798</y>
|
<y>582</y>
|
||||||
<w>66</w>
|
<w>66</w>
|
||||||
<h>18</h>
|
<h>18</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -148,8 +148,8 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>UMLClass</id>
|
<id>UMLClass</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>186</x>
|
<x>366</x>
|
||||||
<y>696</y>
|
<y>480</y>
|
||||||
<w>126</w>
|
<w>126</w>
|
||||||
<h>60</h>
|
<h>60</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -164,23 +164,26 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>UMLClass</id>
|
<id>UMLClass</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>462</x>
|
<x>642</x>
|
||||||
<y>570</y>
|
<y>354</y>
|
||||||
<w>126</w>
|
<w>126</w>
|
||||||
<h>120</h>
|
<h>156</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
<panel_attributes>object: User
|
<panel_attributes>object: User
|
||||||
--
|
--
|
||||||
+ final int connectionID
|
- final int connectionID
|
||||||
+ final String username
|
- final String username
|
||||||
+ final String passwort
|
- final String password
|
||||||
+ int timesPlayed
|
- int timesPlayed
|
||||||
+ int winPercentage
|
- int winPercentage
|
||||||
+ int currentStreak
|
- int currentStreak
|
||||||
+ int maxStreak
|
- int maxStreak
|
||||||
+ int lastDayWOTDFinished
|
- int lastDayWOTDFinished
|
||||||
+ int state
|
- int state
|
||||||
+ int[] wonInTurn
|
- int[] wonInTurn
|
||||||
|
--
|
||||||
|
+ User(pConnectionID)
|
||||||
|
+getter & setter
|
||||||
|
|
||||||
</panel_attributes>
|
</panel_attributes>
|
||||||
<additional_attributes/>
|
<additional_attributes/>
|
||||||
@@ -188,20 +191,20 @@
|
|||||||
<element>
|
<element>
|
||||||
<id>Relation</id>
|
<id>Relation</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>378</x>
|
<x>558</x>
|
||||||
<y>618</y>
|
<y>408</y>
|
||||||
<w>96</w>
|
<w>96</w>
|
||||||
<h>24</h>
|
<h>24</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
<panel_attributes>lt=<..
|
<panel_attributes>lt=<..
|
||||||
n</panel_attributes>
|
m1=n</panel_attributes>
|
||||||
<additional_attributes>140.0;20.0;10.0;20.0</additional_attributes>
|
<additional_attributes>140.0;10.0;10.0;10.0</additional_attributes>
|
||||||
</element>
|
</element>
|
||||||
<element>
|
<element>
|
||||||
<id>Relation</id>
|
<id>Relation</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>240</x>
|
<x>420</x>
|
||||||
<y>672</y>
|
<y>456</y>
|
||||||
<w>24</w>
|
<w>24</w>
|
||||||
<h>36</h>
|
<h>36</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -214,8 +217,8 @@ n</panel_attributes>
|
|||||||
<element>
|
<element>
|
||||||
<id>UMLClass</id>
|
<id>UMLClass</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>684</x>
|
<x>864</x>
|
||||||
<y>606</y>
|
<y>390</y>
|
||||||
<w>126</w>
|
<w>126</w>
|
||||||
<h>54</h>
|
<h>54</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
@@ -230,12 +233,14 @@ String[] guesses
|
|||||||
<element>
|
<element>
|
||||||
<id>Relation</id>
|
<id>Relation</id>
|
||||||
<coordinates>
|
<coordinates>
|
||||||
<x>582</x>
|
<x>762</x>
|
||||||
<y>624</y>
|
<y>402</y>
|
||||||
<w>114</w>
|
<w>114</w>
|
||||||
<h>18</h>
|
<h>30</h>
|
||||||
</coordinates>
|
</coordinates>
|
||||||
<panel_attributes>lt=<..</panel_attributes>
|
<panel_attributes>lt=<..
|
||||||
<additional_attributes>170.0;10.0;10.0;10.0</additional_attributes>
|
m1=1
|
||||||
|
</panel_attributes>
|
||||||
|
<additional_attributes>170.0;20.0;10.0;20.0</additional_attributes>
|
||||||
</element>
|
</element>
|
||||||
</diagram>
|
</diagram>
|
||||||
|
|||||||
Reference in New Issue
Block a user