public String done ()
	// count territory and return result string
	// notifies BoardInterface
	{
		if (Pos.haschildren()) return null;
		clearmarks();
		getinformation();
		int i, j;
		int tb = 0, tw = 0, sb = 0, sw = 0;
		P.getterritory();
		for (i = 0; i < S; i++)
			for (j = 0; j < S; j++)
			{
				if (P.territory(i, j) == 1 || P.territory(i, j) == -1)
				{
					markterritory(i, j, P.territory(i, j));
					if (P.territory(i, j) > 0)
						tb++;
					else tw++;
				}
				else
				{
					if (P.color(i, j) > 0)
						sb++;
					else if (P.color(i, j) < 0) sw++;
				}
			}
		String s = GF.resourceString("Chinese_count_") + "\n"
			+ GF.resourceString("Black__") + (sb + tb)
			+ GF.resourceString("__White__") + (sw + tw) + "\n"
			+ GF.resourceString("Japanese_count_") + "\n"
			+ GF.resourceString("Black__") + (Pw + tb)
			+ GF.resourceString("__White__") + (Pb + tw);
		showinformation();
		copy();
		if (Pos.node().main())
		{
			GF.result(tb, tw);
		}
		return s;
	}