# makes a move effective on the board by modifying board state, or returning a new board with updated board state
def state_change_modified(state, move, in_place=True):
curr_board = state["board"]
from_, to_ = move
"""Updates the board configuration by modifying existing values if in_place is set to True, or creating a new board with updated values if in_place is set to False"""
board = curr_board
if not in_place:
board = copy.deepcopy(curr_board)
if is_valid_move(board, from_, to_):
board[from_[0]][from_[1]] = "_"
board[to_[0]][to_[1]] = "B"
state["board"] = curr_board
state["move"] = "W" if state["move"] == "B" else "B"
new steps
fixes
modification to original utils.py in json file:
adds this function