Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pl.polsl.java.kamil.zietek.lab4.controller.entryPoint;
- import pl.polsl.java.kamil.zietek.lab4.exception.BadIntegerException;
- import pl.polsl.java.kamil.zietek.lab4.view.MainMenuWindow;
- /**
- * Entry Point of application, with method main.
- *
- * @author Kamil Zietek
- * @version 3.0
- */
- public class EntryPoint {
- /**
- * Starting method, checks number of players and activates main
- * mainController.
- *
- * @param args[0] number of players, from command line
- */
- public static void main(String[] args) {
- int numberOfPlayers;
- MainMenuWindow window;
- try {
- numberOfPlayers = Integer.parseInt(args[0]);
- window = new MainMenuWindow(numberOfPlayers);
- } catch (ArrayIndexOutOfBoundsException | NumberFormatException | BadIntegerException e) {
- window = new MainMenuWindow();
- }
- window.start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement