GeneThello Home

net.sf.genethello.gametheory
Class MoveComparator

java.lang.Object
  extended by net.sf.genethello.gametheory.MoveComparator
All Implemented Interfaces:
java.util.Comparator<Move>

public class MoveComparator
extends java.lang.Object
implements java.util.Comparator<Move>

A comparator used to compare two rated moves.

Author:
Administrator

Constructor Summary
MoveComparator()
          Creates a new instance of MoveComparator
 
Method Summary
 int compare(Move o1, Move o2)
          Compares two rated moves.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

MoveComparator

public MoveComparator()
Creates a new instance of MoveComparator

Method Detail

compare

public int compare(Move o1,
                   Move o2)
Compares two rated moves.

Specified by:
compare in interface java.util.Comparator<Move>
Parameters:
o1 - rated move 1
o2 - rated move 2
Returns:
positive if rating 2 > rating 1, 0 if rating 2 == rating 1, or negative if rating 2 < rating 1

GeneThello Home

Get GeneThello: Genetic Othello at SourceForge.net. Fast, secure and Free Open Source software downloads