working castling on console + app to play either mode

This commit is contained in:
Janet-Doe
2025-04-14 11:19:45 +02:00
parent 91678a42b2
commit 3bea2eeb2d
6 changed files with 119 additions and 11 deletions

View File

@@ -0,0 +1,26 @@
package chess;
import chess.view.consolerender.Colors;
import java.util.Scanner;
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.""");
switch (new Scanner(System.in).nextLine()) {
case "1", "Console", "console":
ConsoleMain.main(args);
break;
case "2", "Window", "window":
SwingMain.main(args);
break;
default:
System.out.println("Invalid input");
break;
}
}
}