#!/usr/bin/env python3
#-*- coding: utf-8; -*-

import  sys
try:
    from games_nebula.client.cli.interactive import InteractiveApp
    from games_nebula.client.cli.noninteractive import NonInteractiveApp
    from games_nebula.client.gui.gui import GuiApp
except:
    # Hack to launch the app in the development environment
    import os
    sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
    from games_nebula.client.cli.interactive import InteractiveApp
    from games_nebula.client.cli.noninteractive import NonInteractiveApp
    from games_nebula.client.gui.gui import GuiApp

if __name__ == '__main__':
    if not sys.argv[1:]:
        app = InteractiveApp()
    else:
        if sys.argv[1] != '--gui':
            app = NonInteractiveApp()
        else:
            app = GuiApp()
    app.start()
