tic_tac_toe/utils.py
def display_tutorial_board(board, tut):
	"""
	prints the current board plus the feasibility of each move
	"""
	prob = board[::]
	i = j = 0
	scoreToResult = {1:'W', 0:'D', -1:'L'}
	while j < len(board) :
		if board[j] == '-':
			prob[j] = scoreToResult[tut[i]]
			i += 1
		else:
			prob[j] = '-'
		j += 1

	print ("TIC TAC TOE    		      Move Index		       Winning chance\n")
	print (" " + board[0] + " | " + board[1] + " | " + board[2] + "			 " + "7 8 9" + "				 " + prob[0] + " " + prob[1] + " " + prob[2])
	print ("---|---|---")
	print (" " + board[3] + " | " + board[4] + " | " + board[5] + "			 " + "4 5 6" + "				 " + prob[3] + " " + prob[4] + " " + prob[5])
	print ("---|---|---")
	print (" " + board[6] + " | " + board[7] + " | " + board[8] + "			 " + "1 2 3" + "				 " + prob[6] + " " + prob[7] + " " + prob[8])
	print ("")

	prints the current board plus the feasibility of each move
	
prints the current board plus the feasibility of each move
prints the current board plus the feasibility of each move
def display_tutorial_board(board, tut):
	prob = board[::]
	i = j = 0
	scoreToResult = {1:'W', 0:'D', -1:'L'}
	while j < len(board) :
		if board[j] == '-':
			prob[j] = scoreToResult[tut[i]]
			i += 1
		else:
			prob[j] = '-'
		j += 1
	print ("TIC TAC TOE    		      Move Index		       Winning chance\n")
	print (" " + board[0] + " | " + board[1] + " | " + board[2] + "			 " + "7 8 9" + "				 " + prob[0] + " " + prob[1] + " " + prob[2])
	print ("---|---|---")
	print (" " + board[3] + " | " + board[4] + " | " + board[5] + "			 " + "4 5 6" + "				 " + prob[3] + " " + prob[4] + " " + prob[5])
	print ("---|---|---")
	print (" " + board[6] + " | " + board[7] + " | " + board[8] + "			 " + "1 2 3" + "				 " + prob[6] + " " + prob[7] + " " + prob[8])
	print ("")
def display_tutorial_board ( board , tut ) : prob = board [ : : ] i = j = 0 scoreToResult = { 1 : 'W' , 0 : 'D' , - 1 : 'L' } while j < len ( board ) : if board [ j ] == '-' : prob [ j ] = scoreToResult [ tut [ i ] ] i += 1 else : prob [ j ] = '-' j += 1 print ( "TIC TAC TOE    		      Move Index		       Winning chance\n" ) print ( " " + board [ 0 ] + " | " + board [ 1 ] + " | " + board [ 2 ] + "			 " + "7 8 9" + "				 " + prob [ 0 ] + " " + prob [ 1 ] + " " + prob [ 2 ] ) print ( "---|---|---" ) print ( " " + board [ 3 ] + " | " + board [ 4 ] + " | " + board [ 5 ] + "			 " + "4 5 6" + "				 " + prob [ 3 ] + " " + prob [ 4 ] + " " + prob [ 5 ] ) print ( "---|---|---" ) print ( " " + board [ 6 ] + " | " + board [ 7 ] + " | " + board [ 8 ] + "			 " + "1 2 3" + "				 " + prob [ 6 ] + " " + prob [ 7 ] + " " + prob [ 8 ] ) print ( "" )
prints the current board plus the feasibility of each move
prints the current board plus the feasibility of each move
"""
	prints the current board plus the feasibility of each move
	"""
board
tut