Esempio n. 1
0
        public static ConstellationPattern CreateDefaultConstellation()
        {
            ConstellationPattern patternToCreate = new ConstellationPattern();

            ConstellationNode node1 = new ConstellationNode();

            node1.Name = "head1";
            patternToCreate.AddNode(node1);
            ConstellationNode node2 = new ConstellationNode();

            node2.Name = "head2";
            patternToCreate.AddNode(node2);
            //ConstellationNode node3 = new ConstellationNode();
            //node3.Name = "tail";
            //patternToCreate.AddNode(node3);
            ConstellationNodeSelf self = new ConstellationNodeSelf();

            self.Name = "self";
            patternToCreate.AddNode(self);

            ConstellationLink link = new ConstellationLink(self, node2);

            patternToCreate.AddNodeLink(link);
            ConstellationLink link2 = new ConstellationLink(self, node1);

            patternToCreate.AddNodeLink(link2);
            //ConstellationLink link3 = new ConstellationLink(node1, node2);
            //patternToCreate.AddNodeLink(link3);
            //ConstellationLink link4 = new ConstellationLink(self, node3);
            //patternToCreate.AddNodeLink(link4);

            return(patternToCreate);
        }
Esempio n. 2
0
        public static ConstellationPattern CreateToolsConstellation()
        {
            ConstellationPattern patternToCreate = new ConstellationPattern();

            ConstellationNode node1 = new ConstellationAllyNode();

            patternToCreate.AddNode(node1);
            ConstellationNode node2 = new ConstellationAllyNode();

            patternToCreate.AddNode(node2);
            ConstellationNode node3 = new ConstellationOpponentNode();

            patternToCreate.AddNode(node2);
            ConstellationNodeSelf self = new ConstellationNodeSelf();

            patternToCreate.AddNode(self);

            ConstellationLink link = new ConstellationLink(self, node1);

            patternToCreate.AddNodeLink(link);
            ConstellationLink link2 = new ConstellationLink(self, node2);

            patternToCreate.AddNodeLink(link2);
            ConstellationLink link3 = new ConstellationLink(self, node3);

            patternToCreate.AddNodeLink(link3);

            return(patternToCreate);
        }
Esempio n. 3
0
        public void AddNodeLink(ConstellationLink linkToAdd)
        {
            this.ConstellationLinkSystem.Add(linkToAdd);

            this.constellationNodeToLinks[linkToAdd.Node1].Add(linkToAdd);
            this.constellationNodeToLinks[linkToAdd.Node2].Add(linkToAdd);
        }
Esempio n. 4
0
        public void RemoveNodeLink(ConstellationLink linkToRemove)
        {
            this.ConstellationLinkSystem.Remove(linkToRemove);

            if (this.constellationNodeToLinks.ContainsKey(linkToRemove.Node1))
            {
                this.constellationNodeToLinks[linkToRemove.Node1].Remove(linkToRemove);
            }

            if (this.constellationNodeToLinks.ContainsKey(linkToRemove.Node2))
            {
                this.constellationNodeToLinks[linkToRemove.Node2].Remove(linkToRemove);
            }
        }
Esempio n. 5
0
        public static ConstellationPattern CreateRockConstellation()
        {
            ConstellationPattern patternToCreate = new ConstellationPattern();

            ConstellationNode node1 = new ConstellationLockNode();

            patternToCreate.AddNode(node1);
            ConstellationNodeSelf self = new ConstellationNodeSelf();

            patternToCreate.AddNode(self);

            ConstellationLink link = new ConstellationLink(self, node1);

            patternToCreate.AddNodeLink(link);

            return(patternToCreate);
        }
Esempio n. 6
0
        public static ConstellationPattern CreateHierophantConstellation()
        {
            ConstellationPattern patternToCreate = new ConstellationPattern();

            ConstellationNode node1 = new ConstellationNode();

            patternToCreate.AddNode(node1);
            ConstellationNode node2 = new ConstellationNode();

            patternToCreate.AddNode(node2);

            ConstellationNode node3 = new ConstellationNode();

            patternToCreate.AddNode(node3);
            ConstellationNode node4 = new ConstellationNode();

            patternToCreate.AddNode(node4);

            ConstellationNodeSelf self = new ConstellationNodeSelf();

            patternToCreate.AddNode(self);

            ConstellationLink link = new ConstellationLink(self, node1);

            patternToCreate.AddNodeLink(link);
            ConstellationLink link2 = new ConstellationLink(node1, node2);

            patternToCreate.AddNodeLink(link2);

            ConstellationLink link3 = new ConstellationLink(self, node3);

            patternToCreate.AddNodeLink(link3);
            ConstellationLink link4 = new ConstellationLink(node3, node4);

            patternToCreate.AddNodeLink(link4);

            return(patternToCreate);
        }
Esempio n. 7
0
        public static ConstellationPattern CreateEmpressConstellation()
        {
            ConstellationPattern patternToCreate = new ConstellationPattern();

            ConstellationNode node1 = new ConstellationAllyNode();

            patternToCreate.AddNode(node1);
            ConstellationNode node2 = new ConstellationSpecificCardNode("emperor", ConstellationSpecificCardNode.NodeType.ALLY);

            patternToCreate.AddNode(node2);
            ConstellationNodeSelf self = new ConstellationNodeSelf();

            patternToCreate.AddNode(self);

            ConstellationLink link = new ConstellationLink(self, node2);

            patternToCreate.AddNodeLink(link);
            ConstellationLink link2 = new ConstellationLink(self, node1);

            patternToCreate.AddNodeLink(link2);

            return(patternToCreate);
        }
Esempio n. 8
0
        public static ConstellationPattern CreateArchitectsConstellation()
        {
            ConstellationPattern patternToCreate = new ConstellationPattern();

            ConstellationNode node1 = new ConstellationAllyNode();

            patternToCreate.AddNode(node1);
            ConstellationNode node2 = new ConstellationAllyNode();

            patternToCreate.AddNode(node2);
            ConstellationNodeSelf self = new ConstellationNodeSelf();

            patternToCreate.AddNode(self);

            ConstellationLink link = new ConstellationLink(self, node1);

            patternToCreate.AddNodeLink(link);
            ConstellationLink link2 = new ConstellationLink(node1, node2);

            patternToCreate.AddNodeLink(link2);

            return(patternToCreate);
        }
Esempio n. 9
0
        private void StackConstellationElementFrom(ConstellationLink fromLink, ConstellationNode node, StarEntity starEntity)
        {
            HashSet <ConstellationLink> connectedLinks = this.constellationNodeToLinks[node];

            foreach (ConstellationLink link in connectedLinks)
            {
                if (link != fromLink)
                {
                    ConstellationNode otherNode;
                    if (link.Node1 == node)
                    {
                        otherNode = link.Node2;
                    }
                    else
                    {
                        otherNode = link.Node1;
                    }

                    this.pathStarEntities.Push(starEntity);
                    this.constellationStack.Push(new Tuple <ConstellationLink, ConstellationNode>(link, otherNode));
                }
            }
        }