Beispiel #1
0
        public INode GetRootNode()
        {
            INode newNode  = new ActionNode("new", s => Program.ChangeState(new NewGameState()));
            INode loadNode = new ActionNode("load", s => { });
            INode quitNode = new ActionNode("quit", s => { });
            INode root     = new ChoiceNode("$", newNode, loadNode, quitNode);

            return(root);
        }
Beispiel #2
0
        public INode GetRootNode()
        {
            INode startNode      = new ActionNode("start", startGame);
            INode addFactionNode = new ActionNode("add_faction", addFaction);
            INode infoNode       = new ActionNode("info", info);
            INode setNode        = new ActionNode("set", setParameter);
            INode rootNode       = new ChoiceNode("$", infoNode, setNode, addFactionNode, startNode);

            return(rootNode);
        }
Beispiel #3
0
        public INode GetRootNode()
        {
            INode infoUnit = new ActionNode("unit", s => infoUnitAction(s));
            INode infoTile = new ActionNode("tile", s => infoTileAction(s));
            INode info     = new ChoiceNode("info", infoUnit, infoTile);
            INode edit     = new ActionNode("edit", editAction);
            INode view     = new ActionNode("view", s => Renderer.Render(Game));
            INode end      = new ActionNode("end", endAction);
            INode root     = new ChoiceNode("$", info, view, edit, end);

            return(root);
        }