Merge branch 'master' of woodyfolsom.net:/opt/git/cs8803p4
Conflicts: src/view/ParsedArgs.java
This commit is contained in:
35
test/model/DumpResults.java
Normal file
35
test/model/DumpResults.java
Normal file
@@ -0,0 +1,35 @@
|
||||
package model;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
|
||||
import model.playerModel.GameLog;
|
||||
import model.playerModel.PlayerModel;
|
||||
|
||||
public class DumpResults {
|
||||
public static void main(String[] args) {
|
||||
FileInputStream fin = null;
|
||||
ObjectInputStream oin = null;
|
||||
|
||||
try {
|
||||
fin = new FileInputStream(PlayerModel.getPlayerPath("marshall"));
|
||||
|
||||
oin = new ObjectInputStream(fin);
|
||||
PlayerModel pm = (PlayerModel) oin.readObject();
|
||||
oin.close();
|
||||
|
||||
for (GameLog gl : pm.getScores()) {
|
||||
System.out.println(gl.getScore());
|
||||
}
|
||||
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user