class_game.cpp
bool game::saveArq(const string &arqName){
	ofstream	arq;
	
	
	printf("Saving to file named \"%s\"\n", arqName.c_str());
	arq.open("./patterns/" + arqName + ".life");
	
	if (! arq.is_open()){
		fprintf(stderr, "Erro ao ler arquivo \"%s\".\n", arqName.c_str());
		return false;
	}
	
	
	arq << board.lar << " " << board.alt << "\n#\n";
	FOR(j,board.alt){
		FOR(i,board.lar){
			if(board.v[i][j])arq << "#";
			else			 arq << "-";
		}
		arq << endl;
	}
	
	arq.close();
	printf("Arquivo salvo com sucesso.\n");
	usleep(20000);
	
	return true;
}
/**
 *  \brief Saves current cell world into a file
 *  \return False if the destination file cannot be opened. True if the board was saved sucessfully.
 */
\brief Saves current cell world into a file
\return False if the destination file cannot be opened. True if the board was saved sucessfully.
\ brief Saves current cell world into a file \ return False if the destination file cannot be opened . True if the board was saved sucessfully .
bool game::saveArq(const string &arqName){
	ofstream	arq;
	printf("Saving to file named \"%s\"\n", arqName.c_str());
	arq.open("./patterns/" + arqName + ".life");
	if (! arq.is_open()){
		fprintf(stderr, "Erro ao ler arquivo \"%s\".\n", arqName.c_str());
		return false;
	}
	arq << board.lar << " " << board.alt << "\n#\n";
	FOR(j,board.alt){
		FOR(i,board.lar){
			if(board.v[i][j])arq << "#";
			else			 arq << "-";
		}
		arq << endl;
	}
	arq.close();
	printf("Arquivo salvo com sucesso.\n");
	usleep(20000);
	return true;
}
bool game :: saveArq ( const string & arqName ) { ofstream arq ; printf ( " \" \" \n " , arqName . c_str ( ) ) ; arq . open ( " " + arqName + " " ) ; if ( ! arq . is_open ( ) ) { fprintf ( stderr , " \" \" \n " , arqName . c_str ( ) ) ; return false ; } arq << board . lar << " " << board . alt << " \n \n " ; FOR ( j , board . alt ) { FOR ( i , board . lar ) { if ( board . v [ i ] [ j ] ) arq << " " ; else arq << " " ; } arq << endl ; } arq . close ( ) ; printf ( " \n " ) ; usleep ( 20000 ) ; return true ; }
\brief Saves current cell world into a file
  \return False if the destination file cannot be opened.
\ brief Saves current cell world into a file \ return False if the destination file cannot be opened .