//C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#: //ORIGINAL LINE: void GetHistory(ScoreMoveList &moveList) const public void GetHistory(ScoreMoveList moveList) { moveList.clear(); for (uint i = 0; i < size(); i++) { if (0 < nodeStack[i].moves.size()) { moveList.push_back(nodeStack[i].moves.front()); } } }
public Score(string json) { Dictionary <string, string> strs = Json.fromJson(json); score = Convert.ToInt32(strs["score"]); LinkedList <string> moves = Json.fromJsonArray(strs["moves"]); moveList.clear(); LinkedListNode <string> ite = moves.First; while (ite != null) { //C++ TO C# CONVERTER TODO TASK: Iterators are only converted within the context of 'while' and 'for' loops: moveList.push_back(new Move(ite.Value)); ite = ite.Next; } }