/*
 * 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 blok.shell;

import blok.interfaces.ICore;
import blok.interfaces.IGameController;
import blok.interfaces.IPluginController;
import blok.interfaces.IUIController;

/**
 *
 * @author aluno
 */
public class Core extends ICore {
    private Core() {
    }
    
    public static boolean initialize()
    {
        if (m_core == null) {
            m_core = new Core();
            return m_pluginController.initialize() &&
                   m_uiController.initialize()     &&
                   m_gameController.initialize();
        }
        return true;
    }
    
    @Override
    public IPluginController getPluginController() {
        return m_pluginController;
    }

    @Override
    public IUIController getUIController() {
        return m_uiController;
    }

    @Override
    public IGameController getGameController() {
        return m_gameController;
    }

    private static final IPluginController m_pluginController = new PluginController();
    private static final IUIController m_uiController = new UIController();
    private static final IGameController m_gameController = new GameController();
}
