-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDriver.java
More file actions
60 lines (58 loc) · 1.42 KB
/
Driver.java
File metadata and controls
60 lines (58 loc) · 1.42 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import java.util.Arrays;
import java.util.Scanner;
import java.util.ArrayList;
public class Driver{
public static void main(String[] args){
boolean run = false;
Scanner inp = new Scanner(System.in);
String ANSI_RED = "\u001B[31m";
String ANSI_RESET = "\u001B[0m";
//start
format();
System.out.println(ANSI_RED + "Welcome to the O" + ANSI_RESET);
System.out.println("start? y/n");
if(inp.nextLine().equals("n")){return;}
clearScreen();
format();
System.out.println("Choose: \n 1 - von");
String selection = inp.nextLine();
ArrayList<Adventurer> ppl = new ArrayList<Adventurer>();
if(selection.equals("1")){
KingVon player = new KingVon("Von");
ppl.add(player);
} else{
Adventurer player = new ODweller("default");
ppl.add(player);
}
while(true){
if(inp.nextLine().equals("exit")){return;}
clearScreen();
System.out.println(player.getName() +
" ######## " +
player.getHP +
" / " +
player.getMaxHP() +
" ######## " +
player.getSpecial() +
" / " +
player.getSpecialMax());
System.out.println("action?");
String acc = inp.nextLine();
}
}
public static void format(){
for(int i = 0; i<3; i++){
for(int j = 0; j<10; j++){
System.out.print('#');
}
System.out.println();
}
}
public static void clearScreen() {
System.out.print("\033[H\033[2J");
System.out.flush();
}
public ArrayList<Object> getppl(){
return ppl;
}
}