-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.java
More file actions
33 lines (28 loc) · 927 Bytes
/
Main.java
File metadata and controls
33 lines (28 loc) · 927 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
// Main.java
// contains the main class for running the game
import ansi_terminal.*;
/**
* The following program is a game developed for CPSC 240
* @author WN,MM,AB
*/
public class Main {
public static void main(String[] args) {
// put terminal in raw mode
Terminal.rawMode();
//prints the title screen and if returns true the game runs
boolean playGame = Menu.titleScreen();
if (playGame) {
int loading = Menu.getLoadStatus();
// printing both the plot and setting the players name and icon
if (loading == 0) {
Menu.storyPlot();
Player.setPlayerInfo();
}
Game.instance().run();
// returning the cursor to the bottom of the screen
Terminal.warpCursor(40,0);
// put terminal back into cooked mode
Terminal.cookedMode();
}
}
}