org.dolben.MarkN
Class GeneratorTest

java.lang.Object
  extended by org.dolben.MarkN.GeneratorTest

public abstract class GeneratorTest
extends java.lang.Object

This tests an N digit number game guess generator. Override the newGenerator factory method in a derived class.


Constructor Summary
GeneratorTest()
          constructs a GeneratorTest
 
Method Summary
abstract  Generator newGenerator()
          makes a new Generator
 void test()
          trys guessing all valid targets and prints how many targets required a number of guesses, the distribution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneratorTest

public GeneratorTest()
constructs a GeneratorTest

Method Detail

newGenerator

public abstract Generator newGenerator()
makes a new Generator

Returns:
the new Generator

test

public void test()
          throws java.lang.Exception
trys guessing all valid targets and prints how many targets required a number of guesses, the distribution

Throws:
java.lang.Exception