Ejemplo n.º 1
0
        private void resolvebtn_Click(object sender, EventArgs e)
        {
            //initialPosition = initialpositiontxtbx.Text;
            finalPosition = finalpositiontxtbx.Text;
            Graph              g    = new Graph();
            NodeLaby           N0   = new NodeLaby(initialpositiontxtbx.Text);
            List <GenericNode> Lres = g.RechercheSolutionAEtoile(N0);

            // CA C'EST LE CODE DU TAQUIN, POUR QU'ON L'AIT SOUS LES YEUX

            //if (Lres.Count == 0)
            //{
            //    labelsolution.Text = "Pas de solution";
            //}
            //else
            //{
            //    labelsolution.Text = "Une solution a été trouvée";
            //    foreach (GenericNode N in Lres)
            //    {
            //        listBox1.Items.Add(N);
            //    }
            //    labelcountopen.Text = "Nb noeuds des ouverts : " + g.CountInOpenList().ToString();
            //    labelcountclosed.Text = "Nb noeuds des fermés : " + g.CountInClosedList().ToString();
            //    g.GetSearchTree(treeView1);
        }
Ejemplo n.º 2
0
        public override bool IsEqual(GenericNode N2)
        {
            NodeLaby NL = (NodeLaby)(N2);

            return(NL.Position == Position);
        }