-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMain.java
More file actions
27 lines (25 loc) · 1003 Bytes
/
Main.java
File metadata and controls
27 lines (25 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
* Minimaler Starter zum Demonstrieren der Darstellung. Erzeugt einen kleinen
* Claim mit Beispiel-Schichten.
*/
public class Main {
public static void main(String[] args) {
// Beispiel-Claim 3x6
Parzelle[][] grid = new Parzelle[3][6];
for (int r = 0; r < 3; r++) {
for (int c = 0; c < 6; c++) {
Stack<Erdschicht> st = new Stack<>();
// oberste Schicht variiert: Werte zwischen 5 und 30
double top = 5.0 + r * 6.0; // 5, 11, 17
double mid = 10.0 + c * 4.0; // 10,14,18,22,26,30
double bottom = 20.0; // constant
st.push(new Erdschicht((c % 2 == 0) ? "Sand" : "Humus", top, 0.01));
st.push(new Erdschicht("Lehm", mid, 0.005));
st.push(new Erdschicht("Ton", bottom, 0.002));
grid[r][c] = new Parzelle(st);
}
}
Claim claim = new Claim(grid);
new ClaimController(claim);
}
}