void findBeginningAndFinishLocations() {
        char character;
        beginning = null;
        finish = null;
        for (int column = 0; column < dimension; column++) {
            for (int row = 0; row < dimension; row++) {
                character = getValueAtLocation(column, row);
                if (character == BEGINNING) {
                    beginning = new Location(column, row);
                    if (finish != null) return;
                } else if (character == FINISH) {
                    finish = new Location(column, row);
                    if (beginning != null) return;
                }
            }
        }
    }