Example #1
0
def showSA(p):
    for s in p.states.values():
        show(s.state)
        for a in s.actions:
            print a
            if a.score != 0:
                print '--------'
Example #2
0
def show1(state):
    s = [0] * 42
    for i in range(42):
        if state[0, i] == 1:
            s[i] = 1
        elif state[0, i+42] == 1:
            s[i] = 2
    show(''.join(map(str, s)))
Example #3
0
def showSA(p):
    for s in p.states.values():
        yn = any([(a.score != 0) for a in s.actions])
        if yn:
            show(str(s))
            for a in s.actions:
                if a.score != 0:
                    print a
Example #4
0
    MENU
        1 ===> Ahorcado
        2 ===> Reglas
        3 ===> Funciones
        4 ===> Salir

    """)
    menu_option = input("Opción: ")
    menu_option = menu_option.upper()

    if (menu_option=='1'):
        import game
        fer = game.start();
        if(fer != False):
            msg = ("Ganaste esta ronda")
        else:
            msg = ("Perdiste la ronda")
        chose ==True
    elif(menu_option=='2'):
        import rules
        rules.show()
        chose ==True
    elif(menu_option=='3'):
        import functions
        functions.show()
        chose ==True
    elif(menu_option=='4' or menu_option=="Salir" or menu_option=="salir" or menu_option=="SALIR"):
        break
    else:
        print ("La opción elegida no existe, favor de intentar otra")