public void PrintField(IBalloon[,] matrix)
{
var rowsCount = matrix.GetLength(0);
var colsCount = matrix.GetLength(1);
if (this.balloons == null)
{
this.InitializeBalloonImageMatrix(rowsCount, colsCount);
}
for (int row = 0; row < rowsCount; row++)
{
for (int col = 0; col < colsCount; col++)
{
var colorNumber = matrix[row, col].IsPopped ? 0 : matrix[row, col].Number;
var sourcePath = string.Format(this.Resources.ImagePathTemplate, this.Resources.Colors[colorNumber]);
this.balloons[row, col].SetSource(sourcePath);
}
}
this.Window.UserMoves = 3.ToString();
}