public void populatePuzzle(String filename) throws IOException{
		FileReader fr;
        BufferedReader buff;
        
        try{
        	fr = new FileReader(filename);
            buff = new BufferedReader(fr);
            String line = buff.readLine();
            
            //one line in the file per row in the puzzle
            for(int r = 0; r < size; r++){
            	if(line.isEmpty())
            		System.err.println("Invalid input file. Error line " + r);
            	else
            		for(int c = 0; c < size; c++)
            			setColor(r, c, line.charAt(c));
            	line = buff.readLine();
            }
        }
        catch(IOException ex){
            System.err.println("Oh no! An error occurred!\n Error: " + ex);
        }
	}