import java.io.File;
import java.io.FileNotFoundException;

public class Stage2 {
    public static void main(String[] args) throws FileNotFoundException {
        if(args.length != 2){
            System.out.println("Usage: java Stage2 <pbm input file> <pbm output file>");
            System.exit(0);
        }

        Maze maze = new Maze(new File(args[0]));
        // Add whitespaces between pixels to the input file.
        String fixedFile = args[0].split("\\.")[0] + "_fixed.pbm";
        maze.write(new File(fixedFile));
        // Rotate and create a file.
        maze.rotate();
        maze.write(new File(args[1]));
    }

}


