/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package businessLogic;

import tests.HandAnalyserTest;
import static businessLogic.RoundHandler.*;
import data.*;
import java.util.Random;
import static ui.UI.*;

/**
 *
 * @author OnePoker UN
 */
public class GameEngine {

    public static Random RND;
    private static GameEngine instance;
    private static Tournament tournament;

    private GameEngine() {
        Random RND = new Random();
    }

    private static GameEngine getInstance() {
        if (instance == null) {
            instance = new GameEngine();
        }
        return instance;
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        getInstance();
        //startGame();
        tests();
    }

    public static void startGame() {
        int menu = 0;
        printWelcome();

        while (true) {
            try {
                printMenu();
                menu = askMainMenu();
                switch (menu) {
                    case 1: {
                        playRound(new Round());
                        break;
                    }
                    case 2: {
                        printHelp();
                        break;
                    }
                    case 3: {
                        printCommands();
                        break;
                    }
                    default: {
                        throw new IllegalArgumentException("Not a valid command", null);
                    }

                }
            } catch (Exception ex) {
                System.out.println(ex.getMessage());
                ex.printStackTrace();
                printError();
            }
        }
    }

    private static void tests() {
        HandAnalyserTest.test();
    }

    public static boolean checkCommand(String input, boolean print) {
        switch (input) {
            case "<Exit>": {
                if (print) {
                    printExit();
                }
                System.exit(0);
            }
            case "<Info>": {
                if (print) {
                    printInfo();
                }
                return true;
            }
            case "<Help>": {
                if (print) {
                    printHelp();
                }
                return true;
            }
            default: {
                return false;
            }
        }
    }

}

@@ -926,10 +926,8 @@
     
-//
 star
@@ -944,16 +944,18 @@
         
+//
 tests();
@@ -1118,16 +1118,20 @@
   printM
+ainM
 enu();%0D%0A
@@ -1161,32 +1161,32 @@
 askMainMenu();%0D%0A
-
                 
@@ -1198,24 +1198,147 @@
 h (menu) %7B%0D%0A
+                    case 0:%7B%0D%0A                        //do nothing%0D%0A                        break;%0D%0A                    %7D%0D%0A
             
@@ -2719,32 +2719,148 @@
 %0A            %7D%0D%0A
+            case %22%3CTest%3E%22:%7B%0D%0A                HandAnalyserTest.test();%0D%0A                return true;%0D%0A            %7D%0D%0A
             defa

Add null menu option(case 0)