case "Knight": int[] rowOffsets = { 2, 2, -2, -2, 1, 1, -1, -1 }; int[] colOffsets = { 1, -1, 1, -1, 2, -2, 2, -2 }; for (int i = 0; i < rowOffsets.Length; i++) { int newRow = currentCell.RowNumber + rowOffsets[i]; int newCol = currentCell.ColumnNumber + colOffsets[i]; if (isSafe(newRow, newCol)) theGrid[newRow, newCol].LegalNextMove = true; } break;