public void newGame(EGameMode mode, int gameSize, int winLength) {
        if(mode == EGameMode.online)
            game = new OnlineGame(gameSize, winLength);
        else if(mode == EGameMode.offline) {
            if(secondUser.getClass() != AIUser.class) secondUser = new AIUser();
            game = new OfflineGame(gameSize, winLength);
        }
        Core.getIntance().update();
    }