protected void PrintEdgeText(Sbr.TreeNode node, Sbr.TreeNode parent, EdgeAttributeMap attr) { string sign = parent.Children[0].Value < parent.Children[1].Value ? ">" : "<"; string color = sign == ">" ? "RED" : "GREEN"; PrintEdgeText(node, attr, sign, color); }
protected override void OnTreeEndFunc(TreeT tree, NodeT root) { NodeAttributeMap na = new NodeAttributeMap(); na.fontsize = 22; na.style = "bold"; na.peripheries = 0; EdgeAttributeMap ea = new EdgeAttributeMap(); ea.style = "invis"; _output.WriteLine("{"); for (int r = -1; r <= _maxRound; ++r) { string roundName = GetGvRoundName(r); na.label = "Round " + r.ToString(); WriteNode("round" + roundName, na); if (r > 0) { string prevRoundName = GetGvRoundName(r - 1); WriteEdge("round" + prevRoundName.ToString(), "round" + roundName, ea); } } _output.WriteLine("}"); base.OnTreeEndFunc(tree, root); }
protected override void CustomizeEdgeAttributes(UFToUniAdapter aTree, int n, int pn, List <Context> stack, int depth, EdgeAttributeMap attr) { base.CustomizeEdgeAttributes(aTree, n, pn, stack, depth, attr); /*PlayerTree tree = (PlayerTree)aTree.UfTree; * * if (tree.Nodes[pn].IsHeroActing && n == tree.Nodes[pn].BestBrNode) * { * // Hero have chosen this edge - show thick * attr.penwidth = 3.0; * }*/ }
protected void PrintEdgeText(Sbr.TreeNode node, EdgeAttributeMap attr, string sign, string color) { attr.label = String.Format("<{0} <BR/> <FONT FACE = \"ARIAL\" COLOR=\"{2}\" POINT-SIZE=\"40\">{1}</FONT>>", node.Action, sign, color); }
protected override void CustomizeEdgeAttributes(TreeT tree, NodeT node, NodeT parent, List <ContextT> stack, int depth, EdgeAttributeMap attr) { ContextT context = stack[depth]; string label = context.ActionLabel; //if (context.IsLastPrivateDealInARow) //{ // for (int d = depth - 1; d >= 0 && stack[d].Action.Kind == Ak.d; d--) // { // label = stack[d].Action.ToString() + " " + label; // } //} if ((EdgeLabelPlacement & EdgeLabelPlacementKind.Head) != 0) { attr.headlabel = label; } if ((EdgeLabelPlacement & EdgeLabelPlacementKind.Middle) != 0) { attr.label = label; } if ((EdgeLabelPlacement & EdgeLabelPlacementKind.Tail) != 0) { attr.taillabel = label; } }
protected override void CustomizeEdgeAttributes(TreeNode tree, TreeNode node, TreeNode parent, List <Context> stack, int depth, EdgeAttributeMap attr) { base.CustomizeEdgeAttributes(tree, node, parent, stack, depth, attr); // Hero have chosen this edge - show thick if (stack[depth - 1].Node.BestActionIndex == stack[depth - 1].ChildrenIterator - 1) { attr.penwidth = 2.0; } }