-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserInterface_test.py
More file actions
36 lines (23 loc) · 875 Bytes
/
UserInterface_test.py
File metadata and controls
36 lines (23 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from flask import Flask , redirect , url_for,render_template,request
app = Flask(__name__)
@app.route("/")
def home():
return render_template("home.html")
@app.route("/about")
def about():
return render_template("about.html")
@app.route('/simulation-input')
def simulate():
return render_template("simulation-input.html")
@app.route("/simulation_page")
def simpage():
return render_template("simulation_page.html")
@app.route('/simulation-input',methods = ['POST'])
def get_num_of_steps():
num_of_players = request.form.get('selected_num_players')
num_of_steps = request.form['num_of_steps']
starting_cash = request.form['starting_cash']
print(num_of_steps,starting_cash)
return render_template("simulation_page.html",num_of_players=num_of_players,num_of_steps=num_of_steps)
if __name__ == "__main__":
app.run(debug=True)