src/file_handling/CellDataGenerator.java
private List<String> generateNumberData(List<String> dataList){
		Boolean[][] filled = new Boolean[dimension][dimension];
		for(int x = 0; x < dimension; x++){
			for(int y = 0; y < dimension; y++){
				filled[x][y] = false;
			}
		}
		List<String> result = new ArrayList<String>();
		int totalCells = 0;
		
		for(String data: dataList){
			String[] splitData = data.split(" ");
			totalCells += Integer.parseInt(splitData[0]);
			if(totalCells > dimension*dimension){ //Ensures the user didn't ask for more cells than possible, which would create an infinite loop
				throw new XMLException(myResources.getString("TooManyCells"));
			}
			for(int i = 0; i < Integer.parseInt(splitData[0]); i++){  //A new Cell is added until the desired number is reached
				placeCellRandomly(splitData[1], result, filled);
			}
		}
		
		return result;
	}
/**
	 * Generates a list of Cells and their location given
	 * a Cell type and the number of those Cells desired.
	 * Assumes number of cells comes first, then cell type.
	 * 
	 * @return List of cell locations and states
	 */
Generates a list of Cells and their location given
a Cell type and the number of those Cells desired.
Assumes number of cells comes first, then cell type.

@return List of cell locations and states
Generates a list of Cells and their location given a Cell type and the number of those Cells desired . Assumes number of cells comes first then cell type . @return List of cell locations and states
private List<String> generateNumberData(List<String> dataList){
		Boolean[][] filled = new Boolean[dimension][dimension];
		for(int x = 0; x < dimension; x++){
			for(int y = 0; y < dimension; y++){
				filled[x][y] = false;
			}
		}
		List<String> result = new ArrayList<String>();
		int totalCells = 0;
		for(String data: dataList){
			String[] splitData = data.split(" ");
			totalCells += Integer.parseInt(splitData[0]);
			if(totalCells > dimension*dimension){ 
				throw new XMLException(myResources.getString("TooManyCells"));
			}
			for(int i = 0; i < Integer.parseInt(splitData[0]); i++){  
				placeCellRandomly(splitData[1], result, filled);
			}
		}
		return result;
	}
private List < String > generateNumberData ( List < String > dataList ) { Boolean [ ] [ ] filled = new Boolean [ dimension ] [ dimension ] ; for ( int x = 0 ; x < dimension ; x ++ ) { for ( int y = 0 ; y < dimension ; y ++ ) { filled [ x ] [ y ] = false ; } } List < String > result = new ArrayList < String > ( ) ; int totalCells = 0 ; for ( String data : dataList ) { String [ ] splitData = data . split ( " " ) ; totalCells += Integer . parseInt ( splitData [ 0 ] ) ; if ( totalCells > dimension * dimension ) { throw new XMLException ( myResources . getString ( "TooManyCells" ) ) ; } for ( int i = 0 ; i < Integer . parseInt ( splitData [ 0 ] ) ; i ++ ) { placeCellRandomly ( splitData [ 1 ] , result , filled ) ; } } return result ; }
Generates a list of Cells and their location given
 a Cell type and the number of those Cells desired.
Generates a list of Cells and their location given a Cell type and the number of those Cells desired .
//Ensures the user didn't ask for more cells than possible, which would create an infinite loop //A new Cell is added until the desired number is reached