- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.java
More file actions
Latest commit
43 lines (36 loc) · 1.13 KB
/
Copy pathmain.java
File metadata and controls
43 lines (36 loc) · 1.13 KB
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
38
39
40
41
42
43
importjava.io.IOException;
importjava.util.Observer;
importjava.util.Scanner;
importjava.util.Timer;
importjava.util.TimerTask;
publicclassmain {
publiclongmyLong = 1234;
//Jardin jardin = new Jardin(4,4);
Observerobs;
publicstaticvoidmain(String[] args) throwsIOException {
//On récupère le jardin de tmp
Jardinjardin = newJardin(12,12);
Serreserre = newSerre(jardin, jardin);
//Minuteur pour passer les saisons
finalmaintest = newmain();
Timertimer = newTimer();
timer.schedule(newTimerTask() {
@Override
publicvoidrun() {
test.doStuff(jardin);
}
}, 0, test.myLong);
}
intglobal = 0;
publicvoiddoStuff(Jardinjardin){
System.out.println(global);
if (global == 5) {
jardin.saisonSuivante();
jardin.setMAJPousse(jardin.getEmplacements());
System.out.println(jardin.toString());
global = 0;
}else {
global++;
}
}
}