    // Place SquadMatch test code inside of the SquadMatch class.

    public static void squadTest1 () {
	final SquadMatch match = new SquadMatch();

	// Instantiate the threads
	KThread w1 = new KThread( new Runnable () {
		public void run() {
		    match.warrior();
		    System.out.println ("w1 matched");
		}
	    });
	w1.setName("w1");

	KThread z1 = new KThread( new Runnable () {
		public void run() {
		    match.wizard();
		    System.out.println ("z1 matched");
		}
	    });
	z1.setName("z1");

	KThread t1 = new KThread( new Runnable () {
		public void run() {
		    match.thief();
		    System.out.println ("t1 matched");
		}
	    });
	t1.setName("t1");

	// Run the threads.
	w1.fork();
	z1.fork();
	t1.fork();

	// if you have join implemented, use the following:
	// w1.join();
	// z1.join();
	// t1.join();
	// if you do not have join implemented, use yield to allow
	// time to pass...10 yields should be enough
	for (int i = 0; i < 10; i++) {
	    KThread.currentThread().yield();
	}
    }
    
    public static void selfTest() {
	squadTest1();
    }
