-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathExercise03Base.java
More file actions
37 lines (32 loc) · 1009 Bytes
/
Copy pathExercise03Base.java
File metadata and controls
37 lines (32 loc) · 1009 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
28
29
30
31
32
33
34
35
36
37
import de.unistuttgart.iste.rss.oo.hamstersimulator.external.model.Territory;
import java.io.PrintStream;
import javafx.application.Platform;
import java.io.*;
/**
* Abstrakte Klasse Exercise03Base - beschreiben Sie hier die Klasse
*
* @author (Ihr Name)
* @version (eine Version-Nummer oder ein Datum)
*/
public abstract class Exercise03Base extends SimpleHamsterGame
{
protected Territory territory;
protected PrintStream output = System.out;
Exercise03Base() {
File terFile = new File ("+libs/territories/example01.ter");
try(
InputStream targetStream = new FileInputStream(terFile);
) {
game.initialize(targetStream);
} catch (IOException ex){
throw new RuntimeException(ex);
}
this.territory = this.game.getTerritory();
}
abstract void printWithJavaFX();
public void challenge3() {
Platform.runLater(() -> {
printWithJavaFX();
});
}
}