As a final example suppose we also want to add some territorial move to the tree,
This parser adds a TerritoryFocus and a StringTableFocus to the tree.
The territory focus is given a higher initial proof number pair so
the simple string tactics are read out before going into the
TerritoryFocus::parse() function. This means some of the information
gained by the string tactics could theoretically be used in the territory
evaluation. In fact if the information required was undecided the territory
parser could simply increase it's own PN pair and the search tree would carry on with
the string tactics until it got to complex and then return to the territory parser.
void
RootFocus::parse(Knot *knotNow,int &parseState)
{
assert(parseState == 0 );
Knot *parent=knotNow->parent();
switch (parseState)
{
case 0:
new FocusKnot(
new StringTableFocus(_stringTable,_stringStatusArray)
,1,1,parent);
new FocusProofKnot(
new TerritoryFocus(LowBoard::the()->toMove())
,10,10,parent);
parent->setChildVirtuallyGone(knotNow);
break;
}
parseState++;
}