public class Test { public static void main(String[] args) { GraphicalBoard board; KnightThread thread; java.awt.Label label = new java.awt.Label(); int width = 8, height; if (args.length > 0) width = Integer.valueOf(args[0]).intValue(); if (args.length > 1) height = Integer.valueOf(args[1]).intValue(); else height = width; System.out.println("Starting test on a board of size " + width + "x" + height + "..."); label.setVisible(false); for (int x = 0; x < width; ++x) { for (int y = 0; y < height; ++y) { System.out.print("(" + x + ", " + y + "): "); board = new GraphicalBoard(width, height, null); thread = new KnightThread(board, label); thread.setAnimation(false); thread.setStartSquare(x, y); thread.run(); System.out.println(label.getText()); } } System.out.println("Test finished."); } }