コード例 #1
0
ファイル: SetVariables.cs プロジェクト: sycomix/GHOST_C_sharp
        private void ClearInMatrices(int row, int col, string buildingShort, int buildingIndex)
        {
            if (_matrixIndex[row, col].Contains(buildingIndex))
            {
                _matrixType[row, col].Remove(buildingShort);
                _matrixIndex[row, col].Remove(buildingIndex);

                var key = "" + row + "," + col;

                if (Failures.ContainsKey(key))
                {
                    if (_matrixType[row, col].Count < 2 ||
                        _matrixType[row, col].Contains("###") ||
                        (_matrixType[row, col].Count == 1 && _matrixType[row, col][0].Contains("@")))
                    {
                        Failures.Remove(key);
                    }
                    else
                    {
                        Failures[key] = string.Join("", _matrixType[row, col].ToArray());
                    }
                }
            }
        }