Files
3DChess/app/src/main/java/chess/App.java
fl.du.pr Grens 97950403a5
All checks were successful
Linux arm64 / Build (push) Successful in 33s
class documentation - a shitload of it
2025-05-18 20:08:22 +02:00

43 lines
1.2 KiB
Java

package chess;
import java.util.Scanner;
import chess.view.consolerender.Colors;
/**
* Main class of the chess game. Asks the user for the version to use and runs the according main.
* @author Grenier Lilas
* @author Pribylski Simon
* @see ConsoleMain
* @see SwingMain
* @see OpenGLMain
*/
public class App {
public static void main(String[] args) {
System.out.println(Colors.RED + "Credits: Grenier Lilas, Pribylski Simon." + Colors.RESET);
System.out.println("""
Pick the version to use:
1 - Console
2 - Window
3 - 3D.""");
Scanner scan = new Scanner(System.in);
String line = scan.nextLine();
scan.close();
switch (line) {
case "1", "Console", "console":
ConsoleMain.main(args);
break;
case "2", "Window", "window":
SwingMain.main(args);
break;
case "3", "3D", "3d":
OpenGLMain.main(args);
break;
default:
System.out.println("Invalid input");
break;
}
}
}