Class Rules

java.lang.Object
  extended by Rules

public class Rules
extends java.lang.Object

This class is used to check the validity of the moves made by the players. It also checks to see if the conditions for the end of the game have been met.

Author:
,

Constructor Summary
Rules(Board board, Driver driver)
          The constructor for the Rules class.
 
Method Summary
 boolean validateMove(Move move)
          This method checks to see if the move that was just made was valid and returns a boolean indicating that.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rules

public Rules(Board board,
             Driver driver)
The constructor for the Rules class.

Parameters:
board - - the checker board.
driver - - the main driver of the program.
Method Detail

validateMove

public boolean validateMove(Move move)
This method checks to see if the move that was just made was valid and returns a boolean indicating that.

Parameters:
move - The move that is to be validated.
Returns:
Boolean indicating if it was valid.