Commit 5acf8a1f authored by Stefano Cobelli's avatar Stefano Cobelli

Started Ai Player

parent 4d538c31
......@@ -7,6 +7,9 @@
*/
package model.player;
import java.util.ArrayList;
import java.util.Hashtable;
import model.Board;
import model.Mark;
......@@ -14,7 +17,10 @@ import model.Mark;
* @author mjt023
*
*/
public class AIPlayer extends Player {
public class AIPlayer extends Player implements AutoPlayable {
private Hashtable<Mark[][], Boolean> hashBoards = new Hashtable<Mark[][], Boolean>();
private ArrayList<Mark[][]> boardStreak = new ArrayList<Mark[][]>();
/**
* @param theBoard
......@@ -22,7 +28,26 @@ public class AIPlayer extends Player {
*/
public AIPlayer(Board theBoard, Mark myMark) {
super(theBoard, myMark);
// TODO Auto-generated constructor stub
}
/*
* (non-Javadoc)
*
* @see model.player.AutoPlayable#decideMove()
*/
@Override
public boolean decideMove() {
return false;
}
public Mark[][] turnBoard(Mark[][] boardToTurn) {
return boardToTurn;
}
public Mark[][] flipBoard(Mark[][] boardToFlip) {
return boardToFlip;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment