fourwin
Class NewMiniMax

java.lang.Object
  extended by fourwin.FourPlayer
      extended by fourwin.NewMiniMax

public class NewMiniMax
extends FourPlayer

Reference implementation of MiniMax without Alpha-Beta pruning.

Author:
Sebastian

Field Summary
private  int moves
           
private  int nextMove
           
private  byte opponentColorValue
           
 
Fields inherited from class fourwin.FourPlayer
color, colorValue, opponentID, playerID
 
Constructor Summary
NewMiniMax()
           
 
Method Summary
private  int IntSignum(int value)
           
private  int Maximize(int levelsToGo, int levels, PlayingField board2)
           
private  int Minimize(int levelsToGo, int levels, PlayingField board2)
           
 PlayingField move(PlayingField board)
           
 
Methods inherited from class fourwin.FourPlayer
getColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextMove

private int nextMove

opponentColorValue

private byte opponentColorValue

moves

private int moves
Constructor Detail

NewMiniMax

public NewMiniMax()
Method Detail

move

public PlayingField move(PlayingField board)
Specified by:
move in class FourPlayer

Maximize

private int Maximize(int levelsToGo,
                     int levels,
                     PlayingField board2)

Minimize

private int Minimize(int levelsToGo,
                     int levels,
                     PlayingField board2)

IntSignum

private int IntSignum(int value)