public CaseClass(WhereItem where, object then, CaseClass parent) { _where = where; _then = then; _parent = parent; }
// Use this for initialization void Start() { caseClass = GetComponent<CaseClass>(); }
/** * @brief genere le labyrinthe de facon aleatoire * @param c1 Case_ la case qui va etre liberee */ public void generer(CaseClass.Case_ c1) { generer(c1, 0); }
/** * @brief genere le labyrinthe de facon aleatoire * @param c1 Case_ la case qui va etre liberee * @param dist la distance entre c1 et la case de depart */ public void generer(CaseClass.Case_ c1, int dist) { c1.setEmpty(); c1.D=dist; dist++; while (!c1.cantOpen()){ CaseClass.Case_ c2; CaseClass.Direction d; do{ d=getRandomDirection(); c2=c1.getNextCase(d); }while(c2==null || c2.isOpen(c1)); generer(c2, dist); } }
// Use this for initialization void Start() { caseClass = GetComponent <CaseClass>(); }