diff --git a/app/src/main/java/net/exkazuu/mimicdance/Lessons.java b/app/src/main/java/net/exkazuu/mimicdance/Lessons.java index 0b683c8..e5e784b 100644 --- a/app/src/main/java/net/exkazuu/mimicdance/Lessons.java +++ b/app/src/main/java/net/exkazuu/mimicdance/Lessons.java @@ -8,16 +8,17 @@ public class Lessons { "くりかえし3\n左腕を上げる\n左腕を下げる\nここまで\nくりかえし3\n右腕を上げる\n右腕を下げる\nここまで", "右腕を上げる\nもしも黄色\n右腕を下げる\nもしくは\n左腕を上げる\nもしおわり", "くりかえし3\nもしも黄色\n右腕を上げる\n右腕を下げる\nもしくは\n左腕を上げる\n左腕を下げる\nもしおわり\nここまで", - "くりかえし2\nもしも黄色\n左腕を上げる\n左腕を下げる\nもしくは\n右腕を上げる\n右腕を下げる\nもしおわり\nここまで",}; + //"くりかえし2\nもしも黄色\n左腕を上げる\n左腕を下げる\nもしくは\n右腕を上げる\n右腕を下げる\nもしおわり\nここまで", + }; - private static int[] limitations = {10, 12, 10, 8, 10, 10, 10}; // hard + private static int[] maxSteps = {10, 12, 10, 8, 10, 10}; public static String getCoccoCode(int lessonNumber) { return coccoCodes[lessonNumber - 1]; } - public static int getLimitation(int lessonNumber) { - return limitations[lessonNumber - 1]; + public static int getMaxStep(int lessonNumber) { + return maxSteps[lessonNumber - 1]; } public static int getLessonCount() { diff --git a/app/src/main/java/net/exkazuu/mimicdance/activities/CodingActivity.java b/app/src/main/java/net/exkazuu/mimicdance/activities/CodingActivity.java index 67929ce..febfe63 100644 --- a/app/src/main/java/net/exkazuu/mimicdance/activities/CodingActivity.java +++ b/app/src/main/java/net/exkazuu/mimicdance/activities/CodingActivity.java @@ -32,7 +32,7 @@ public void onCreate(Bundle savedInstanceState) { initializeNumberIcons(cellTexts, cellIcons); ImageView[] steps = initializeStepNumbers(); - initializeMaximumStep(cellIcons, steps); + initializeMaximumStep(cellIcons, steps, Lessons.getMaxStep(lessonNumber)); } private String[][] initializeCellTexts(String piyoCode) { @@ -105,19 +105,7 @@ private void initializeNumberIcons(String[][] cellTexts, ImageView[][] cellIcons } } - private void initializeMaximumStep(ImageView[][] cells, ImageView[] step) { - if (lessonNumber == 2) { - setMaximumStep(cells, step, 12); - } else if (lessonNumber == 4) { - setMaximumStep(cells, step, 8); - } else if (lessonNumber == 7) { - setMaximumStep(cells, step, 12); - } else { - setMaximumStep(cells, step, 10); - } - } - - private void setMaximumStep(ImageView[][] cells, ImageView[] step, int maxStep) { + private void initializeMaximumStep(ImageView[][] cells, ImageView[] step, int maxStep) { for (int row = 0; row < maxStep; row++) { for (int column = 0; column < cells[0].length; column++) { cells[row][column].setVisibility(View.VISIBLE);