forked from btrzcinski/apaquarium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAquariumMain.java
32 lines (29 loc) · 993 Bytes
/
AquariumMain.java
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
import aquarium.Aquarium;
import aquarium.ui.AquariumFrame;
/**
* Class holding the main method for the AP Aquarium.
*/
public class AquariumMain
{
/**
* The main method for the AP Aquarium. The method:
* <ul>
* <li>Creates an {@link Aquarium}, and calls {@link Aquarium#fillWithCreatures}
* <li>Creates an {@link AquariumFrame}, displays it, and starts the Aquarium.
* </ul>
*
* @param args Command line arguments (unused)
* @see Aquarium#fillWithCreatures
*/
public static void main(String[] args)
{
Aquarium aquarium = new Aquarium();
aquarium.fillWithCreatures();
// add 22 to height to account for title bar
AquariumFrame aquariumFrame = new AquariumFrame(
aquarium, Aquarium.WIDTH, Aquarium.HEIGHT + Aquarium.SKY_HEIGHT + 22);
aquarium.setFrame(aquariumFrame);
aquariumFrame.setVisible(true);
aquarium.start();
}
}