working castling on console + app to play either mode
This commit is contained in:
26
app/src/main/java/chess/App.java
Normal file
26
app/src/main/java/chess/App.java
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user