- Created a new ComPlayer. It targets a particular score, and does it pretty well. It does this by counting the number of empty spaces and the number of empty spaces that can potentially be created by removing tiles then either playing to block or playing to extend the game.

- Created DumpResults.java, which simply outputs all scores in a player model so that they can be graphed.
This commit is contained in:
Marshall
2012-04-30 05:18:02 -04:00
parent 8de42a3562
commit 0724d44ec4
7 changed files with 364 additions and 2 deletions

View 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();
}
}
}