Esempio n. 1
0
        public void RemoveNode(string name)
        {
            if (!AllNodesDict.ContainsKey(name))
            {
                throw new Exception();
            }

            State node = AllNodesDict[name];

            AllNodesDict.Remove(name);
            AllNodes.Remove(node);
        }
Esempio n. 2
0
        public void RenameNode(string name, string newName)
        {
            if (newName == "say")
            {
                throw new Exception();
            }

            if (AllNodesDict.ContainsKey(newName) || !AllNodesDict.ContainsKey(name))
            {
                throw new Exception();
            }

            AllNodesDict.Remove(name);
            State node = AllNodesDict[name];

            AllNodesDict.Add(node.Name, node);
        }