I need some help, I've got a matrix 4x4 that shows a mountain, in the Mountain.txt there are the heights of mountain zones:
1 1 1 1
1 2 3 1
1 2 2 1
1 1 1 1
And the file Rocks.txt that has a type or rock for each zone:
stone stone stone stone
stone sand sand stone
stone sand sand sand
sand sand sand sand
Public class Mountain {
int height;
String typeRock;
public Mountain (int height, String typeRock) {
this.height = height;
this.typeRock = typeRock;
};
}
How do I read that data from 2 different files and to make objects with it, like
Mountain zone00 = new Mountain(1, stone);
Mountain zone01 = new Mountain(1, stone);
Mountain zone11 = new Mountain(2, sand);
And so on...