|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAnalyser
public class Analyser
The snEADy Analyser is a very small tool to evaluate several round data from
snEADy.
If the file "logs/result.log" has changed in the home directory from snEADy
all player names and points were read from this file. After that the average
ranks were calculated and copied to the clipboard.
This tool may be useful to assess and improve your own snake. All you have
to do is to start the batch file (check that the location of the result.log
is right) and than start the snEADy game several times. You might do this
also with a batch file.
Any questions? There's no need to be shy - mail to tthuem[at]web.de.
Field Summary | |
---|---|
private static double[] |
averageRank
Average rank of all happend players. |
private static long |
lastModified
Last time the log file was modified. |
private static java.io.File |
logFile
The specified log file. |
private static int |
MAX_PLAYER
Maximum count of players in the tournament. |
private static int |
playerCount
Count of players already happened in this tournament. |
private static java.lang.String[] |
playerName
Names of all happend players. |
private static int[] |
playTimes
Count of the times a player was registerd in this tournament. |
private static int[] |
points
Cumulated points of the players. |
private static int |
roundCount
Count of rounds in this tournament. |
private static int |
UPDATE_CYCLE
Count of milliseconds the modified time of the log file was checked. |
Constructor Summary | |
---|---|
Analyser()
|
Method Summary | |
---|---|
private static void |
checkFileChanges()
Checks if the log file has changed and reads the new round data. |
static void |
main(java.lang.String[] args)
Starts the application with the location of the "logs/result.log" as a parameter |
private static void |
printTournamentData()
Prints the current tournament data and copies it to the clipboard. |
private static void |
readNextRound()
Reads the round data from the specified log file. |
static void |
setClipboardContents(java.lang.String content)
Places a string on the clipboard. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int UPDATE_CYCLE
private static java.io.File logFile
private static long lastModified
private static final int MAX_PLAYER
private static int playerCount
private static int roundCount
private static java.lang.String[] playerName
private static double[] averageRank
private static int[] points
private static int[] playTimes
Constructor Detail |
---|
public Analyser()
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- should contain only one parameterprivate static void checkFileChanges()
private static void readNextRound()
private static void printTournamentData()
public static void setClipboardContents(java.lang.String content)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |