showpoints(calls the getscoreofboard(function and then prints the player' and computer' scores remember that getscoreofboard(returns dictionary with the keys 'xand 'oand values of the scores for the and players that' all the functions for the reversi game the code starting on line will implement the actual game and calls these functions as needed the start of the game print('welcome to reversi!' while true reset the board and game mainboard getnewboard( resetboard(mainboard playertilecomputertile enterplayertile( showhints false turn whogoesfirst( print('the turn will go first 'the while loop on line is the main game loop the program will loop back to line when new game starts first get new game board data structure by calling getnewboard(and set the starting tiles by calling resetboard(mainboard is the main game board data structure for the program the call to enterplayertile(will let the player type in whether they want to be 'xor 'othe return value is then stored in playertile and computertile using multiple assignment showhints is boolean value that determines if hints mode is on or off it starts as off as false on line the turn variable is string that either has the string value 'playeror 'computerit will keep track of whose turn it is it is set to the return value of whogoesfirst()which randomly chooses who will go first running the player' turn while true if turn ='player' player' turn if showhints validmovesboard getboardwithvalidmoves(mainboardplayertile drawboard(validmovesboard elsepost questions to