private Dictionary <Move, ChessDBCNScore> ParseScoresFromResponse(string fen, string responseStr) { Dictionary <Move, ChessDBCNScore> scores = new Dictionary <Move, ChessDBCNScore>(); string[] byMoveStrs = responseStr.Split('|'); foreach (var byMoveStr in byMoveStrs) { string[] parts = byMoveStr.Split(','); Dictionary <string, string> values = new Dictionary <string, string>(); foreach (var part in parts) { string[] kv = part.Split(':'); if (kv.Length < 2) { continue; } values.Add(kv[0], kv[1]); } values.TryGetValue("move", out string moveStr); values.TryGetValue("score", out string scoreStr); if (moveStr != null && scoreStr != null) { try { scores.Add(Lan.LanToMove(fen, moveStr), new ChessDBCNScore(scoreStr)); } catch { } } } return(scores); }