Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.adorphuye.othello.player
Class Player  view Player download Player.java

java.lang.Object
  extended bycom.adorphuye.othello.player.Player
All Implemented Interfaces:
com.adorphuye.othello.gui.board.BoardListener, java.util.EventListener
Direct Known Subclasses:
AIPlayer, HumanPlayer, PlayerDecorator

public abstract class Player
extends java.lang.Object
implements com.adorphuye.othello.gui.board.BoardListener


Field Summary
static int DEFAULT_DEPTH
           
static int MAX_DEPTH
           
static int MIN_DEPTH
           
private  com.adorphuye.othello.gui.board.BoardDataModel model
           
private  int mynum
           
private static int playernum
           
 
Constructor Summary
protected Player()
           
  Player(com.adorphuye.othello.gui.board.BoardDataModel mod, int num)
           
 
Method Summary
 void boardChanged(com.adorphuye.othello.gui.board.BoardEvent e)
           
 int getIndex()
           
 com.adorphuye.othello.gui.board.BoardDataModel getModel()
           
 int getSide()
           
abstract  void play()
           
abstract  void reset()
           
 void setIndex(int num)
           
 void setModel(com.adorphuye.othello.gui.board.BoardDataModel mod)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_DEPTH

public static final int MAX_DEPTH
See Also:
Constant Field Values

MIN_DEPTH

public static final int MIN_DEPTH
See Also:
Constant Field Values

DEFAULT_DEPTH

public static final int DEFAULT_DEPTH
See Also:
Constant Field Values

model

private com.adorphuye.othello.gui.board.BoardDataModel model

playernum

private static int playernum

mynum

private int mynum
Constructor Detail

Player

protected Player()

Player

public Player(com.adorphuye.othello.gui.board.BoardDataModel mod,
              int num)
Method Detail

setIndex

public void setIndex(int num)

play

public abstract void play()

reset

public abstract void reset()

getIndex

public int getIndex()

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


getSide

public int getSide()

setModel

public void setModel(com.adorphuye.othello.gui.board.BoardDataModel mod)

getModel

public com.adorphuye.othello.gui.board.BoardDataModel getModel()

boardChanged

public void boardChanged(com.adorphuye.othello.gui.board.BoardEvent e)
Specified by:
boardChanged in interface com.adorphuye.othello.gui.board.BoardListener