public int[,] readBoard(string boardType, string player)
{
int[,] board = new int[10, 10];
int i = 0, j = 0;
string regexpLine = @"(\d)";
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(this.fullFileName);
XmlNode node = xmlDoc.DocumentElement.SelectSingleNode(boardType + player);
Match m = Regex.Match(node.InnerText, regexpLine);
while (m.Success)
{
board[i, j] = System.Convert.ToInt16(m.Value);
if (j < 9)
{
j++;
}
else
{
j = 0;
i++;
}
m = m.NextMatch();
}
return board;
}