Exemplo n.º 1
0
Arquivo: app.py Projeto: chlrhdms/10ww
def login():
    if request.method == 'GET':
        return render_template('login.html')
    else:
        id = request.form['id']
        pw = request.form['pw']
        print (id,type(id))
        print (pw,type(pw))
        # id와 pw가 db 값이랑 비교 해서 맞으면 맞다 틀리면 틀리다
        ret = dbdb.select_user(id, pw)
        print(ret)
        if ret != None:
            session['user'] = id
            game.set_charact(ret[2])
            return redirect(url_for('index'))
        else:
            return redirect(url_for('login'))
Exemplo n.º 2
0
def hellovar(name):
  charact =game.set_charact(name)
  return "{0}님 반갑습니다. (HP {1}으로 게임을 시작 합니다" .format(character["name"], character["hp"]))
Exemplo n.º 3
0
def helloovar(name):
    character = game.set_charact(name)
    return render_template('gamestart.html', data=character)
Exemplo n.º 4
0
def gamestart3(name):
    character = game.set_charact(name)
    return render_template("gamestart.html")
Exemplo n.º 5
0
def gameplay():
    name = session['user']
    character = game.set_charact(name)
    return render_template('gamestart.html', data=character)
Exemplo n.º 6
0
def game_route(name):
    character = game.set_charact(name)
    return render_template('game1.html', data=character)
Exemplo n.º 7
0
def flower(name):
    character = game.set_charact(name)
    return render_template('flower.html', data=character)