Removed code redundancies
This commit is contained in:
1 parent
5cd47f0537
commit
ec766aa7b5
25 files changed
+145
-243
No files matched your search
@@ -711,14 +711,13 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
if (_Fields[_Possibilities[i, j]].Content.Winner > 0)
|
||||
check.Add(_Fields[_Possibilities[i, j]].Content.Winner);
|
||||
}
|
||||
if (check.Count == _Possibilities.GetLength(1))
|
||||
{
|
||||
//Check for winner
|
||||
if (check.Contains(1) && !check.Contains(2))
|
||||
return 1;
|
||||
else if (check.Contains(2) && !check.Contains(1))
|
||||
return 2;
|
||||
}
|
||||
if (check.Count != _Possibilities.GetLength(1))
|
||||
continue;
|
||||
//Check for winner
|
||||
if (check.Contains(1) && !check.Contains(2))
|
||||
return 1;
|
||||
if (check.Contains(2) && !check.Contains(1))
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user