Created
January 20, 2014 03:51
-
-
Save tarynsauer/8514606 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package tictactoe; | |
| abstract class AlphaBetaPlayer implements AbstractPlayer { | |
| private String marker; | |
| private Player opponent; | |
| public AbstractAlphaBeta(Player player) { | |
| this.marker = player.getMarker(); | |
| this.opponent = player.getOpponent(); | |
| } | |
| public String getMarker() { | |
| return marker; | |
| } | |
| public Player getOpponent() { return opponent; } | |
| public void setOpponent(Player player) { | |
| this.opponent = player; | |
| } | |
| public void addMarker(Board board, int cellIndex) { | |
| board.getCells()[cellIndex] = this.marker; | |
| } | |
| public double getAlpha(double alpha, double score) { | |
| return alpha; | |
| } | |
| public double getBeta(double beta, double score) { | |
| return beta; | |
| } | |
| public double returnBestScore(double alpha, double beta) { | |
| return alpha; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment