소스 검색

Merge pull request #628 from exercism/ocr-numbers

ocr-numbers: estimate difficulty, position
FridaTveit 9 년 전
부모
커밋
8f3aba584f
2개의 변경된 파일13개의 추가작업 그리고 13개의 파일을 삭제
  1. 10
    10
      config.json
  2. 3
    3
      exercises/ocr-numbers/src/example/java/OpticalCharacterReader.java

+ 10
- 10
config.json 파일 보기

271
       "topics": []
271
       "topics": []
272
     },
272
     },
273
     {
273
     {
274
-      "slug": "rectangles",
275
-      "difficulty": 7,
276
-      "topics": []
277
-    },
278
-    {
279
       "slug": "meetup",
274
       "slug": "meetup",
280
       "difficulty": 7,
275
       "difficulty": 7,
281
       "topics": []
276
       "topics": []
291
       "topics": []
286
       "topics": []
292
     },
287
     },
293
     {
288
     {
289
+      "slug": "ocr-numbers",
290
+      "difficulty": 8,
291
+      "topics": []
292
+    },
293
+    {
294
+      "slug": "rectangles",
295
+      "difficulty": 8,
296
+      "topics": []
297
+    },
298
+    {
294
       "slug": "book-store",
299
       "slug": "book-store",
295
       "difficulty": 8,
300
       "difficulty": 8,
296
       "topics": []
301
       "topics": []
326
       "topics": []
331
       "topics": []
327
     },
332
     },
328
     {
333
     {
329
-      "slug": "ocr-numbers",
330
-      "difficulty": 1,
331
-      "topics": []
332
-    },
333
-    {
334
       "slug": "run-length-encoding",
334
       "slug": "run-length-encoding",
335
       "difficulty": 1,
335
       "difficulty": 1,
336
       "topics": []
336
       "topics": []

+ 3
- 3
exercises/ocr-numbers/src/example/java/OpticalCharacterReader.java 파일 보기

8
  */
8
  */
9
 final class OpticalCharacterReader {
9
 final class OpticalCharacterReader {
10
 
10
 
11
-    private static final int ROWS_PER_LINE  = 4;
11
+    private static final int ROWS_PER_LINE = 4;
12
 
12
 
13
     private static final int COLS_PER_SSD = 3;
13
     private static final int COLS_PER_SSD = 3;
14
 
14
 
56
                     "Number of input rows must be a positive multiple of " + ROWS_PER_LINE);
56
                     "Number of input rows must be a positive multiple of " + ROWS_PER_LINE);
57
         }
57
         }
58
 
58
 
59
-        final int inputColumnCount = input.get(0).length();
59
+        final int inputColCount = input.get(0).length();
60
 
60
 
61
-        if (inputColumnCount == 0 || inputColumnCount % 3 != 0) {
61
+        if (inputColCount == 0 || inputColCount % 3 != 0) {
62
             throw new IllegalArgumentException(
62
             throw new IllegalArgumentException(
63
                     "Number of input columns must be a positive multiple of " + COLS_PER_SSD);
63
                     "Number of input columns must be a positive multiple of " + COLS_PER_SSD);
64
         }
64
         }