Untitled
Anonymous
csharp
12/04/2024 9:24 AM
6.6 KB
36
Indexable
if (Input[i][j] == 'A')
{
if (i >= 1 && (Input[i].Length - 1) - j >= 1)
{
if (Input[i - 1][j + 1] == 'S')
{
if ((Input.Count - 1) - i >= 1 && (Input[i].Length - 1) - j >= 1)
{
if (Input[i + 1][j + 1] == 'S')
{
if ((Input.Count - 1) - i >= 1 && j >= 1)
{
if (Input[i + 1][j - 1] == 'M')
{
if (i >= 1 && j >= 1)
{
if (Input[i - 1][j - 1] == 'M')
{
masCount++;
}
}
}
}
}
}
}
if (Input[i - 1][j + 1] == 'S')
{
if ((Input.Count - 1) - i >= 1 && (Input[i].Length - 1) - j >= 1)
{
if (Input[i + 1][j + 1] == 'M')
{
if ((Input.Count - 1) - i >= 1 && j >= 1)
{
if (Input[i + 1][j - 1] == 'M')
{
if (i >= 1 && j >= 1)
{
if (Input[i - 1][j - 1] == 'S')
{
masCount++;
}
}
}
}
}
}
}
if (Input[i - 1][j + 1] == 'M')
{
if ((Input.Count - 1) - i >= 1 && (Input[i].Length - 1) - j >= 1)
{
if (Input[i + 1][j + 1] == 'M')
{
if ((Input.Count - 1) - i >= 1 && j >= 1)
{
if (Input[i + 1][j - 1] == 'S')
{
if (i >= 1 && j >= 1)
{
if (Input[i - 1][j - 1] == 'S')
{
masCount++;
}
}
}
}
}
}
}
if (Input[i - 1][j + 1] == 'M')
{
if ((Input.Count - 1) - i >= 1 && (Input[i].Length - 1) - j >= 1)
{
if (Input[i + 1][j + 1] == 'S')
{
if ((Input.Count - 1) - i >= 1 && j >= 1)
{
if (Input[i + 1][j - 1] == 'S')
{
if (i >= 1 && j >= 1)
{
if (Input[i - 1][j - 1] == 'M')
{
masCount++;
}
}
}
}
}
}
}
}
}Editor is loading...
Leave a Comment