code: def compute_utility(self, board, move, player):
          "If X wins with this move, return 1; if O return -1; else return 0."
          if (self.k_in_row(board, move, player, (0, 1)) or
              self.k_in_row(board, move, player, (1, 0)) or
              self.k_in_row(board, move, player, (1, -1)) or
              self.k_in_row(board, move, player, (1, 1))):
              return if_(player == 'X', +1, -1)
          else:
              return f compute_utility(self, board, move, player):
          "If X wins with this move, return 1; if O return -1; else return 0."
          if (self.k_in_row(board, move, player, (0, 1)) or
              self.k_in_row(board, move, player, (1, 0)) or
              self.k_in_row(board, move, player, (1, -1)) or
              self.k_in_row(board, move, player, (1, 1))):
              return if_(player == 'X', +1, -1)
          else:
              return 0
docs: If X wins with this move, return 1; if O return -1; else return 0.