Example #1
0
        static void Main(string[] args)
        {
            string[]   schema1 = { "*******",// 4 7
                                   "*d----*",
                                   "**---a*",
                                   "*******" };
            string[]   schema2 = { "*************************************",//  13 37
                                   "*d--*-***----------*--*----*----*---*",
                                   "*---*-*-----***----------*---*----*-*",
                                   "*---*-*-************--*--**********-*",
                                   "*---*-*-*----------*--*-----------*-*",
                                   "*-------*---*****************-*-*-*-*",
                                   "*---*---*---*-------------*---*-*-***",
                                   "*---*---*---*---********--*-**--*---*",
                                   "*---*---*----------*---*--*-*********",
                                   "*---------------*--*-*----*---------*",
                                   "*---*************--*-************-***",
                                   "*------------------*------------*--a*",
                                   "*************************************" };
            string[]   schema3 = { "*************************************",// 13 37
                                   "*d----------------------------------*",
                                   "*-----------------------------------*",
                                   "*-----------------------------------*",
                                   "*-----------------------------------*",
                                   "*-----------------------------------*",
                                   "*-----------------------------------*",
                                   "*-----------------------------------*",
                                   "*-----------------------------------*",
                                   "*-----------------------------------*",
                                   "*---------------------------------a-*",
                                   "*-----------------------------------*",
                                   "*************************************" };
            Labyrinth  lab     = new Labyrinth(schema1, 4, 7);
            personnage myperso = new personnage(lab);

            while (!myperso.EstArrivee())
            {
                myperso.DeplacementSuivant();
            }
        }
Example #2
0
 public personnage(Labyrinth lab)
 {
     this.mylab = lab;
     this.mypos = lab.Depart;
 }