#!/usr/bin/python2

##
# PyCross
# https://github.com/leosartaj/PyCross.git
#
# Copyright (c) 2014 Sartaj Singh
# Licensed under the MIT license.
##

import optparse

# for gui
from PyCross.gui.pycrossGUIClass import pycrossGUIClass
import gtk

# terminal
from PyCross.pycross_term import play_terminal

def parse_args():
    usage = """usage: %prog [options]

    Run 
    pycross -h/--help
    For help
"""

    parser = optparse.OptionParser(usage)

    help = "Pass the flag to play the terminal version"
    parser.add_option('--terminal', '-t', action='store_true', help=help, dest='terminal')

    options, args = parser.parse_args()

    if len(args):
        parser.error('expecting no arguments')

    return options

if __name__ == '__main__':
    options = parse_args()

    if options.terminal:
        play_terminal(3, 10)
    else:
        app = pycrossGUIClass()
        gtk.main()
