Alpha-Beta move generator can look 2 plays (4 plies) ahead on a 4x4 board and blocks every possible attempt by the player to connect 3.
It should be possible to play on larger boards when the computers 'move' is changed from playing a tile to picking the player's next available color.
This commit is contained in:
@@ -35,8 +35,9 @@ public class MainFrame extends JFrame {
|
||||
|
||||
private void init() {
|
||||
ScorePanel sp = new ScorePanel(referee);
|
||||
TileSelectionPanel tp = new TileSelectionPanel(referee.getHumanPlayer());
|
||||
referee.setScorePanel(sp);
|
||||
|
||||
TileSelectionPanel tp = new TileSelectionPanel(referee.getHumanPlayer());
|
||||
BoardPanel bp = new BoardPanel(referee,tp);
|
||||
referee.setBoardPanel(bp);
|
||||
|
||||
@@ -82,7 +83,7 @@ public class MainFrame extends JFrame {
|
||||
add(vWrapper,BorderLayout.CENTER);
|
||||
|
||||
//To ensure correct size, pre-populate the score and message panels with text.
|
||||
sp.updateScore();
|
||||
sp.updateScore(0);
|
||||
mp.updateMessage("Loading new game...");
|
||||
|
||||
pack();
|
||||
|
||||
Reference in New Issue
Block a user