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

Quick Search    Search Deep

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

java.lang.Object
  extended bycom.adorphuye.othello.player.Player
      extended bycom.adorphuye.othello.player.HumanPlayer
All Implemented Interfaces:
com.adorphuye.othello.gui.board.BoardListener, java.util.EventListener, java.awt.event.MouseListener

public class HumanPlayer
extends Player
implements com.adorphuye.othello.gui.board.BoardListener, java.awt.event.MouseListener


Field Summary
private  java.util.Vector hs
           
 
Fields inherited from class com.adorphuye.othello.player.Player
DEFAULT_DEPTH, MAX_DEPTH, MIN_DEPTH
 
Constructor Summary
HumanPlayer(com.adorphuye.othello.gui.board.BoardDataModel mod, int num)
           
 
Method Summary
 void boardChanged(com.adorphuye.othello.gui.board.BoardEvent evt)
           
 void mouseClicked(java.awt.event.MouseEvent mouseEvent)
          This method is called when the mouse is clicked (pressed and released in short succession) on a component.
 void mouseEntered(java.awt.event.MouseEvent mouseEvent)
          This method is called when the mouse enters a component.
 void mouseExited(java.awt.event.MouseEvent mouseEvent)
          This method is called when the mouse exits a component.
 void mousePressed(java.awt.event.MouseEvent mouseEvent)
          This method is called when the mouse is pressed over a component.
 void mouseReleased(java.awt.event.MouseEvent mouseEvent)
          This method is called when the mouse is released over a component.
 void play()
           
 void reset()
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class com.adorphuye.othello.player.Player
getIndex, getModel, getSide, setIndex, setModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hs

private java.util.Vector hs
Constructor Detail

HumanPlayer

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

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()).

Overrides:
toString in class Player

play

public void play()
Specified by:
play in class Player

mouseExited

public void mouseExited(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse exits a component.

Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is released over a component.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is pressed over a component.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is clicked (pressed and released in short succession) on a component.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse enters a component.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

boardChanged

public void boardChanged(com.adorphuye.othello.gui.board.BoardEvent evt)
Specified by:
boardChanged in interface com.adorphuye.othello.gui.board.BoardListener
Overrides:
boardChanged in class Player

reset

public void reset()
Specified by:
reset in class Player