Here's some pseudo-code for a way to implement (and debug) the beast:, building on the code that you already have:



int main(String [] args) {

// For initial debugging, why not...