-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
36 lines (30 loc) · 909 Bytes
/
Copy pathMain.java
File metadata and controls
36 lines (30 loc) · 909 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
package edu.kit.informatik;
/**
* @author John Dederer
* @version 1.0
*/
public final class Main {
private Main() {
}
/**
* The entry point of the program.
* For a full list of commands:
* @see CommandLine#SELECT
* @see CommandLine#PLACE
* @see CommandLine#BAG
* @see CommandLine#ROWPRINT
* @see CommandLine#COLPRINT
* @see CommandLine#QUIT
* @param args the type of pitch
*/
public static void main(String[] args) {
if (args.length != 1) {
Terminal.printLine("Error, one parameter is required to start the game.");
System.exit(1);
}
Pitch pitch = PitchParser.getPitchType(args[0]); //generates pitch based on parameter type provided
Bag bag = new Bag();
bag.fillBag(); //fills bag with 16 unique tokens
CommandLine.startInteractiveSequence(pitch, bag);
}
}