Skip to content

Commit 629a7eb

Browse files
committed
Clean up code
1 parent e6f1310 commit 629a7eb

File tree

3 files changed

+11
-24
lines changed

3 files changed

+11
-24
lines changed

.idea/vcs.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LoginLogs.iml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,15 @@
2121
<SOURCES />
2222
</library>
2323
</orderEntry>
24+
<orderEntry type="module-library" scope="TEST">
25+
<library name="JUnit4">
26+
<CLASSES>
27+
<root url="jar://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar!/" />
28+
<root url="jar://$APPLICATION_HOME_DIR$/lib/hamcrest-core-1.3.jar!/" />
29+
</CLASSES>
30+
<JAVADOC />
31+
<SOURCES />
32+
</library>
33+
</orderEntry>
2434
</component>
2535
</module>

src/net/acomputerdog/loginlogs/log/PlayerList.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import java.io.BufferedReader;
66
import java.io.IOException;
7-
import java.io.Reader;
87
import java.io.Writer;
98
import java.util.*;
109
import java.util.logging.Logger;
@@ -15,25 +14,11 @@ public class PlayerList {
1514
private final List<LLPlayer> playerList = new ArrayList<>();
1615
private final Map<String, LLPlayer> uuidMap = new HashMap<>();
1716
private final Map<String, LLPlayer> nameMap = new HashMap<>();
18-
//private final LLPlayer[] recentLogins = new LLPlayer[MAX_LOGINS];
1917
private final List<LLPlayer> loginList = new ArrayList<>(MAX_LOGINS + 1);
20-
//private final Set<LLPlayer> recentPlayers = new HashSet<>();
2118
private final Logger logger;
22-
//private final Comparator<LLPlayer> playerSorter;
2319

2420
public PlayerList(Logger logger) {
2521
this.logger = logger;
26-
/*
27-
playerSorter = (o1, o2) -> {
28-
if (o1 != null && o2 != null) {
29-
return (int)o1.getLoginTime() - (int)o2.getLoginTime();
30-
} else if (o1 == null) {
31-
return -1; //null goes below not null
32-
} else {
33-
return 1; //not null goes above null
34-
}
35-
};
36-
*/
3722
}
3823

3924
public void load(BufferedReader in) {
@@ -116,13 +101,5 @@ public void updateRecentLogins(LLPlayer player) {
116101
while (loginList.size() > MAX_LOGINS) {
117102
loginList.remove(loginList.size() - 1);
118103
}
119-
/*if (!recentPlayers.contains(player)) {
120-
recentPlayers.add(player);
121-
LLPlayer last = recentLogins[MAX_LOGINS - 1];
122-
recentPlayers.remove(last);
123-
recentLogins[MAX_LOGINS - 1] = player;
124-
Arrays.sort(recentLogins, playerSorter);
125-
}
126-
*/
127104
}
128105
}

0 commit comments

Comments
 (0)