feat: better cli input
This commit is contained in:
parent
702200b220
commit
cf21f34a1a
|
@ -14,3 +14,10 @@ application {
|
||||||
mainClass = 'ma2tetr.App'
|
mainClass = 'ma2tetr.App'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
manifest {
|
||||||
|
attributes(
|
||||||
|
"Main-Class": "ma2tetr.App"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,7 +10,10 @@ public class App {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
double radius;
|
double radius;
|
||||||
if (args.length != 2) {
|
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 {
|
try {
|
||||||
radius = Double.parseDouble(args[1]);
|
radius = Double.parseDouble(args[1]);
|
||||||
|
|
Loading…
Reference in a new issue