- // CALLED FUNCTION 
-   
- std::map<int, Board*> Board::potentialMoves() { 
-   
-     cout<<"Find potentialMoves for:\n"<<*this<<endl; 
-     int space = -1, v = -1; 
-   
-     std::map<int, Board*> moves; 
-   
-   
-     for(int i = 0; i < size_; i++){ 
-   
-       if(tiles_[i] == 0){ 
-           space = i;  
-       }  
-     }     
-   
-     std::cout<<"Space is at :"<<space<<endl; 
-     std::cout<<"Dim value: "<<dim<<endl; 
-   
-     if(space >= dim){ 
-   
-       v = tiles_[space-dim]; 
-   
-       int temptiles[this->size_]; 
-   
-       for(int i = 0; i < this->size_; i++){ 
-   
-         temptiles[i] = this->tiles_[i]; 
-       } 
-   
-       Board *newb = new Board(temptiles, this->size_); 
-       newb -> move(v); 
-   
-       //cout<<"Top Move: \n"<<*newb<<endl; 
-       //cout<<"Move"<<newb; 
-   
-       moves.insert(std::pair<int,Board*>(v,newb)); 
-       //bug.insert(std::make_pair(v,*newb)); 
-   
-       for(map<int,Board*>::iterator it = moves.begin(); 
-       it != moves.end(); ++it) 
-     {       
-       std::cout << "Inside: \n" << *(it->second) << "\n"; 
-     }      
-   
-       // std::cout<<"Added a top neighbor"<<endl; 
-     } 
-   
-     for(map<int,Board*>::iterator it = moves.begin(); 
-       it != moves.end(); ++it) 
-     {       
-       std::cout << "Outside: \n" << *(it->second) << "\n"; 
-     } 
-   
-   
-   
-     // if(space%dim != 0){ 
-   
-     //   v = tiles_[space-1]; 
-   
-     //   int temptiles[this->size_]; 
-   
-     //   for(int i = 0; i < this->size_; i++){ 
-   
-     //     temptiles[i] = this->tiles_[i]; 
-     //   } 
-   
-     //   Board *newb = new Board(temptiles, this->size_); 
-     //   newb -> move(v); 
-   
-     //   cout<<"Left Move: \n"<<*newb<<endl; 
-   
-     //   moves.insert(std::pair<int,Board*>(v,newb)); 
-   
-     //   // std::cout<<"Added a left neighbor"<<endl; 
-   
-     // } 
-   
-     // if(space + dim < size_) { 
-   
-   
-     //   v = tiles_[space+dim]; 
-   
-     //   int temptiles[this->size_]; 
-   
-     //   for(int i = 0; i < this->size_; i++){ 
-   
-     //     temptiles[i] = this->tiles_[i]; 
-     //   } 
-   
-     //   Board *newb = new Board(temptiles, this->size_); 
-     //   newb -> move(v); 
-   
-     //   cout<<"Bottom Move: \n"<<*newb<<endl; 
-   
-     //   moves.insert(std::pair<int,Board*>(v,newb)); 
-   
-     //   // std::cout<<"Added a bottom neighbor"<<endl; 
-   
-     // } 
-   
-     // if(space%dim != dim - 1) { 
-   
-     //   v = tiles_[space+1]; 
-   
-     //   int temptiles[this->size_]; 
-   
-     //   for(int i = 0; i < this->size_; i++){ 
-   
-     //     temptiles[i] = this->tiles_[i]; 
-     //   } 
-   
-     //   Board *newb = new Board(temptiles, this->size_); 
-     //   newb -> move(v); 
-   
-     //   cout<<"Right Move: \n"<<*newb<<endl; 
-   
-     //   moves.insert(std::pair<int,Board*>(v,newb)); 
-   
-     //   // std::cout<<"Added a right neighbor"<<endl; 
-   
-     // } 
-   
-     for(map<int,Board*>::iterator it = moves.begin(); 
-       it != moves.end(); ++it) 
-     {       
-       std::cout << "Sending board: \n" << it->second << "\n"; 
-     } 
-   
-     return moves; 
-   
- } 
-   
- // CALLING FUNCTION 
-   
-     std::map<int, Board*> suc; 
-   
-     	suc = (t->b_)->potentialMoves(); 
-   
- 		std::map<int, Board*>::iterator it = suc.begin(); 
-   
- 		for (it=suc.begin(); it!=suc.end(); ++it){ 
-   
- 			cout<<"Successor: \n"<<it->second<<endl;			 
-   
- 			// BoardSet::iterator i = closedlist.find(it->second); 
-   
- 			// if(i == closedlist.end()){ 
-   
- 			// 	PuzzleMove *old = new PuzzleMove(*it->second);	 
-   
- 			// 	// (it->second)->move(it->first); 
-   
- 			// 	// cout<<"Pushing: \n"<<*(it->second)<<endl; 
-   
- 			// 	PuzzleMove *p = new PuzzleMove(it->first,it->second,old);	 
-   
- 			// 	openlist.push(p);	 
- 			// 	expansions_++;	 
-   
- 			// 	closedlist.insert(p->b_); 
-   
- 			// } 
- 		} 
-   
- // PRINTING FUNCTION  
-   
- std::ostream& operator<<(std::ostream &os, const Board &b) { 
-   
-   for(int i = 0; i < b.size_; i++){ 
-   
-       if(i!=0 && i%(int)sqrt(b.size_) == 0) os << endl; 
-       os << " "; 
-       os << setw(2) << b.tiles_[i] ; 
-   } 
-   
-   return os; 
- } 
-