From 1c9d47a75ea17bdb2571e04d1177192103c76529 Mon Sep 17 00:00:00 2001 From: Hilde Pols Date: Wed, 15 Aug 2018 17:50:30 +0200 Subject: [PATCH] Use RECURSION variable in for-loop To ensure the CantorGasket works with higher and lower recursions, use the variable and deduct one in the for-loop. --- .../gamedev/drawthecantorgasket/DrawTheCantorGasket.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.3.08-Solution-DrawTheCantorGasket/core/src/com/udacity/gamedev/drawthecantorgasket/DrawTheCantorGasket.java b/1.3.08-Solution-DrawTheCantorGasket/core/src/com/udacity/gamedev/drawthecantorgasket/DrawTheCantorGasket.java index 57fdd441..c2937613 100644 --- a/1.3.08-Solution-DrawTheCantorGasket/core/src/com/udacity/gamedev/drawthecantorgasket/DrawTheCantorGasket.java +++ b/1.3.08-Solution-DrawTheCantorGasket/core/src/com/udacity/gamedev/drawthecantorgasket/DrawTheCantorGasket.java @@ -83,7 +83,7 @@ private void punchCantorGasket(float x, float y, float size, int recursions) { // Thanks to GitHub user khafan! https://github.com/khafan // for (int i = 0; i < 9; i++) { -// if (i == 4) continue; +// if (i == RECURSIONS -1) continue; // punchCantorGasket(i%3 * newSize + x, i/3 * newSize + y, newSize, recursions); // } }