From c31bc39780066b78a8b55fc3df80ec01e1440430 Mon Sep 17 00:00:00 2001 From: Alexander Munch-Hansen Date: Tue, 22 May 2018 00:26:32 +0200 Subject: [PATCH] More server --- app.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index cad6ed9..a605180 100644 --- a/app.py +++ b/app.py @@ -108,20 +108,19 @@ def post_board(): player = -1 board = [int(x) for x in data['board'].split(',')] - prev_board = [int(x) for x in data['prev_board'].split(',')] + prev_board = [int(x) for x in data['prevBoard'].split(',')] + print(data['roll']) roll = [int(x) for x in data['roll'].split(',')] + print(roll) quad = data['quad'] == "true" # print(board) - total_roll = int(data['total_roll']) + total_roll = int(data['totalRoll']) print("total roll is:", total_roll) return_board, total_moves, roll = calc_move_stuff(tuple(prev_board), tuple(board), tuple(roll), player, total_roll, quad) - - - str_board = ",".join([str(x) for x in return_board]) str_roll = ",".join([str(x) for x in roll]) @@ -133,4 +132,4 @@ def post_board(): return return_string if __name__ == '__main__': - app.run() + app.run(host = '0.0.0.0', port=35270)