feat: better cli input
This commit is contained in:
parent
702200b220
commit
cf21f34a1a
|
@ -14,3 +14,10 @@ application {
|
|||
mainClass = 'ma2tetr.App'
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes(
|
||||
"Main-Class": "ma2tetr.App"
|
||||
)
|
||||
}
|
||||
}
|
|
@ -10,7 +10,10 @@ public class App {
|
|||
public static void main(String[] args) {
|
||||
double radius;
|
||||
if (args.length != 2) {
|
||||
throw new RuntimeException("Needs 2 arguments");
|
||||
System.out.println("Required arguments: <calculator> <radius>");
|
||||
System.out.println(" - calculator: either 'scaling' or 'moving'");
|
||||
System.out.println(" - radius: the sphere radius as a number");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
radius = Double.parseDouble(args[1]);
|
||||
|
|
Loading…
Reference in New Issue