**Question:any one know why i’m geting this? I get a error that says ‘Program.ceackforablock(bool[,])’: not all code paths return a value
csharp**
Repl link:https://replit.com/@Josephyc/ticktactoe
public bool ceackforablock(bool[,] inputaray)
{
bool isblocked = false;
bool[,] isblockedaray = { { false, false, false }, { false, false, false }, { false, false, false } };
int x = -1;
int y = -1;
int isthisthefirstone = 0;
if (isthisthefirstone == 0)
{
foreach (bool input in inputaray)
{
bool isyesinputturn = false;
if (x == 3)
{
y++;
x = -1;
}
if (x > 3)
{
x++;
}
if (input)
{
isblockedaray[x, y] = true;
return isyesinputturn = true;
}
if (!(input) && (isyesinputturn = false))
{
isblockedaray[x, y] = false;
return isyesinputturn = false;
}
isyesinputturn = false;
}
}
if (isthisthefirstone > 0)
{
foreach (bool input2 in inputaray)
{
if (x == 3)
{
y++;
x = -1;
}
if (x > 3)
{
x++;
}
if (input2 == true && isblockedaray[x, y] == true)
{
isblocked = true;
}
if ((input2 == false && isblockedaray[x, y] == true) || (input2 == true && isblockedaray[x, y] == false))
{
isblocked = false;
}
}
return isblocked;
}