示例#1
0
        /* FIN ATRIBUTOS */

        /* CONSTRUCTOR */
        public Laberinto(IronScheme.Runtime.Cons laberinto)
        {
            Vector3 aniadir = new Vector3();

            IronScheme.Runtime.Cons aux;
            ("(import (SchemeLibraries laberinto))").Eval();
            String tr = "(getInicio '" + laberinto.ToPrettyString().Replace('\n', ' ').Trim() + ")";

            aux         = (IronScheme.Runtime.Cons)(tr).Eval();
            this.Inicio = new Vector3(aux);
            aux         = (IronScheme.Runtime.Cons)("(getFinal '" + laberinto.ToPrettyString().Replace('\n', ' ').Trim() + ")").Eval();
            this.Final  = new Vector3(aux);
            this.DimX   = (int)("(getDimX '" + laberinto.ToPrettyString().Replace('\n', ' ').Trim() + ")").Eval();
            this.DimY   = (int)("(getDimY '" + laberinto.ToPrettyString().Replace('\n', ' ').Trim() + ")").Eval();
            aux         = (IronScheme.Runtime.Cons)laberinto.cdr;
            aux         = (IronScheme.Runtime.Cons)aux.car;
            // GENERANDO LABERINTO LIST<VECTOR3>
            this.lab = new List <Vector3>();
            this.lab.Add(this.Final);
            //EMPIEZA DEL FINAL, HASTA EL INICIO, EL RESTO DEL LABERINTO ESTA ENTRE ELLOS, GENERA UN CAMINO
            do
            {
                aux     = (IronScheme.Runtime.Cons)aux.cdr;
                aniadir = new Vector3((IronScheme.Runtime.Cons)aux.car);
                this.lab.Add(aniadir);
            }while (!this.Inicio.Equals(aniadir));
        }
示例#2
0
 public Vector3(IronScheme.Runtime.Cons punto3)
 {
     IronScheme.Runtime.Cons aux = (IronScheme.Runtime.Cons)punto3.cdr;
     this.x = (int)punto3.car;
     this.y = (int)aux.car;
     aux    = (IronScheme.Runtime.Cons)aux.cdr;
     this.t = (int)aux.car;
 }