More server
This commit is contained in:
parent
6133cb439f
commit
c31bc39780
11
app.py
11
app.py
|
@ -108,20 +108,19 @@ def post_board():
|
||||||
player = -1
|
player = -1
|
||||||
|
|
||||||
board = [int(x) for x in data['board'].split(',')]
|
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(',')]
|
roll = [int(x) for x in data['roll'].split(',')]
|
||||||
|
print(roll)
|
||||||
quad = data['quad'] == "true"
|
quad = data['quad'] == "true"
|
||||||
|
|
||||||
|
|
||||||
# print(board)
|
# print(board)
|
||||||
|
|
||||||
total_roll = int(data['total_roll'])
|
total_roll = int(data['totalRoll'])
|
||||||
print("total roll is:", total_roll)
|
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)
|
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_board = ",".join([str(x) for x in return_board])
|
||||||
str_roll = ",".join([str(x) for x in roll])
|
str_roll = ",".join([str(x) for x in roll])
|
||||||
|
|
||||||
|
@ -133,4 +132,4 @@ def post_board():
|
||||||
return return_string
|
return return_string
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run()
|
app.run(host = '0.0.0.0', port=35270)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user