def play(): player_names = player.get_player_names_from_db(GAME_ID, get_db()) cur_player_name = game_control.player_name_check(request.args.get('player',''), session['player'], player_names) if cur_player_name: session['player'] = cur_player_name else: return render_template('select_player.html', players=player_names) if status.get_round_from_db(GAME_ID, get_db()) == -1: game_control.initialize_game(GAME_ID, get_db()) cur_player = player.get_player_from_db_by_name(cur_player_name, GAME_ID, get_db()) pd = playset.parse_playset('/Users/danielsprechman/development/projects/fiasco/playset_main_st.txt') return render_template('play.html', player=session['player'], playset_name='Main St.', dice_html=view.get_dice_html(dice.get_dice_from_db(GAME_ID, get_db()).dice), neighbors=[cur_player.p_left_name, cur_player.p_right_name], playset_html = view.get_playset_html(pd, get_db(), cur_player_name, GAME_ID))
def get_setup_status(): dice_html = view.get_dice_html(dice.get_dice_from_db(GAME_ID, get_db()).dice) data = {'dice_html' : dice_html} #data = {'test1' : 'a', 'test2' : 'b'} #print "RETURNING: " + str(jsonify(data)) return jsonify(data)