Slight modification to move calculation

This commit is contained in:
Alexander Munch-Hansen 2018-05-20 19:43:28 +02:00
parent f834b10e02
commit 5acd79b6da

5
app.py
View File

@ -32,14 +32,15 @@ def calc_move_sets(from_board, roll, player):
# print("Value of r:", r) # print("Value of r:", r)
sets.append([Board.calculate_legal_states(board, player, [r, 0]), r]) sets.append([Board.calculate_legal_states(board, player, [r, 0]), r])
total += r total += r
sets.append([Board.calculate_legal_states(board, player, [total, 0]), total]) sets.append([Board.calculate_legal_states(board, player, roll), total])
# print(sets)
return sets return sets
def tmp_name(from_board, to_board, roll, player, total_moves, is_quad=False): def tmp_name(from_board, to_board, roll, player, total_moves, is_quad=False):
sets = calc_move_sets(from_board, roll, player) sets = calc_move_sets(from_board, roll, player)
return_board = from_board return_board = from_board
print("To board:\n",to_board)
print("All sets:\n",sets)
for idx, board_set in enumerate(sets): for idx, board_set in enumerate(sets):
board_set[0] = list(board_set[0]) board_set[0] = list(board_set[0])
# print(to_board) # print(to_board)