def GET(self): newboard = set_any_dimension.board(4) newboard.dealboard(12) printboard = printcards(newboard) printthesets = printallsets(newboard) numsetsonboard = newboard.numsetsonboard() return render.setweb(printboard, numsetsonboard, printthesets)
def GET(self): newboard2 = set_any_dimension.board(4) newboard2.dealboard(12) printboard = printcards(newboard2) printthesupersets = printallsupersets(newboard2) numsupersetsonboard = numsupersets(newboard2) return render.supersetweb(printboard,printthesupersets, numsupersetsonboard)
def GET(self): newboard2 = set_any_dimension.board(4) newboard2.dealcards(12) printboard = printcards(newboard2) printthesupersets = printallsupersets(newboard2) numsupersetsonboard = numsupersets(newboard2) return render.supersetweb(printboard, printthesupersets, numsupersetsonboard)
def GET(self): global newboard newboard = set_any_dimension.board(4) newboard.dealcards(12) printboard = printcards(newboard) printthesets = printallsets(newboard) numsetsonboard = newboard.numsetsonboard() modifiedBoard = newboard return render.setweb(printboard, numsetsonboard, printthesets, newboard)
import web import random import math import set_any_dimension render2 = web.template.render("templates/") render = web.template.render("testdirectory/") urls = ("/boom", "boom", "/town", "town", "/new", "new") firstboard = set_any_dimension.board(4) firstboard.dealboard(12) numsetsonfirstboard = firstboard.numsetsonboard() print numsetsonfirstboard def printcards(board): testlist = [] for i in range(len(board.cardsonboard)): testlist.append(set_any_dimension.cardmapping(board.cardsonboard[i])) for i in range(len(testlist)): testlist[i] = "static/setcards/" + str(testlist[i]) + ".JPG" return testlist
def whatever(): if request.method == 'GET': return render_template('menupage.html') elif request.method == 'POST': return redirect('/dimensionpage') @set_app.route('/dimensionpage',methods=['GET','POST']) def dimensions(): if request.method == 'GET': return render_template('dimensions.html') if request.method == 'POST': return redirect('/setpage') BOARD = sad.board(4) @set_app.route('/setpage',methods=['GET','POST']) def setpage(): if request.method == 'GET': BOARD.clearboard() BOARD.dealcards(12) list_sets = ['' for i in range(12)] card_nums = [str(wrs.cardmapping(card)) for card in BOARD.cardsonboard] list_cards = ["/static/{}.JPG".format(card_num) for card_num in card_nums] return render_template('setpage.html',l=list_cards,num='', cn=card_nums) elif request.method == 'POST': list_cards = ["/static/{}.JPG".format(wrs.cardmapping(card))\ for card in BOARD.cardsonboard]
import web import random import math import set_any_dimension render2 = web.template.render('templates/') render = web.template.render('testdirectory/') urls = ('/boom', 'boom', '/town', 'town', '/new', 'new') firstboard = set_any_dimension.board(4) firstboard.dealboard(12) numsetsonfirstboard = firstboard.numsetsonboard() print numsetsonfirstboard def printcards(board): testlist = [] for i in range(len(board.cardsonboard)): testlist.append(set_any_dimension.cardmapping(board.cardsonboard[i])) for i in range(len(testlist)): testlist[i] = 'static/setcards/' + str(testlist[i]) + '.JPG' return testlist print firstboard.printsetsonboard()