void readConfig(String configFilePath) {
        try {
            Scanner s = null;
            s = new Scanner(new BufferedReader(new FileReader(configFilePath)));
            
            mintime = 0;

            // nsegments
            nsegments = s.nextInt();

            nblocks = new int[nsegments];

            // nblocks
            for (int i = 0; i < nsegments; i++) {
                nblocks[i] = s.nextInt();
                mintime = mintime + nblocks[i];
            }

            capacity = new int[nsegments+1];
            capacity[0] = capacity[nsegments] = Integer.MAX_VALUE;

            // capacities
            for (int i = 1; i != nsegments; ++i)
                capacity[i] = s.nextInt();
        }
        catch (Exception e) {
            e.printStackTrace();
            return;
        }        
        
        // segment+1 parking lots
        left = new Parking[nsegments+1];
        right = new Parking[nsegments+1];

        for (int i = 0; i != nsegments+1; ++i) {
            if (i != 0)
                left[i] = new Parking();

            if (i != nsegments)
                right[i] = new Parking();
        }
            
        // initialize the road
        segments = new MovingCar[nsegments][];

        for (int i = 0; i < nsegments; i++)
            segments[i] = new MovingCar[nblocks[i]];

        // light i controls cars that enter segment i
        llights = new boolean[nsegments];
        rlights = new boolean[nsegments];

        // before the game starts
        // set moving cars to empty
        movingCars = new LinkedList<MovingCar>();

        // init the player
        player.init(nsegments, nblocks, capacity.clone());
    }