tic_tac_toe/utils.py
def the_move(board, lst):
	"""
	returns a random index out of the best moves
	"""
	max_val = max(lst)
	max_array = []
	for i in range(len(lst)):
		if lst[i] == max_val:
			max_array.append(i)
	k = move_random(max_array)
	cntr = 0
	for i in range(9):
		if board[i] == '-':
			cntr += 1
		if cntr == k+1:
			return i

	returns a random index out of the best moves
	
returns a random index out of the best moves
returns a random index out of the best moves
def the_move(board, lst):
	max_val = max(lst)
	max_array = []
	for i in range(len(lst)):
		if lst[i] == max_val:
			max_array.append(i)
	k = move_random(max_array)
	cntr = 0
	for i in range(9):
		if board[i] == '-':
			cntr += 1
		if cntr == k+1:
			return i
def the_move ( board , lst ) : max_val = max ( lst ) max_array = [ ] for i in range ( len ( lst ) ) : if lst [ i ] == max_val : max_array . append ( i ) k = move_random ( max_array ) cntr = 0 for i in range ( 9 ) : if board [ i ] == '-' : cntr += 1 if cntr == k + 1 : return i
returns a random index out of the best moves
returns a random index out of the best moves
"""
	returns a random index out of the best moves
	"""
board
lst