diff --git a/.gradle/8.8/executionHistory/executionHistory.bin b/.gradle/8.8/executionHistory/executionHistory.bin index c5229e59328a2cff7436dc5261b21bf1aba59d6e..fa35c1eb18a4f98f221ed796f8659a7fe5daa222 100644 Binary files a/.gradle/8.8/executionHistory/executionHistory.bin and b/.gradle/8.8/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.8/executionHistory/executionHistory.lock b/.gradle/8.8/executionHistory/executionHistory.lock index 5fb36bb7b36df647bf2046d6283f338992cdbd46..db33ea1fd7c3174a2b9e2c4b764be7fb0d2a3dee 100644 Binary files a/.gradle/8.8/executionHistory/executionHistory.lock and b/.gradle/8.8/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.8/fileHashes/fileHashes.bin b/.gradle/8.8/fileHashes/fileHashes.bin index 189a87ee37a9134ff24002720f4739b078a3cf90..ddac65beefa1ab7fcb5c3a44b431245ff0b02470 100644 Binary files a/.gradle/8.8/fileHashes/fileHashes.bin and b/.gradle/8.8/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.8/fileHashes/fileHashes.lock b/.gradle/8.8/fileHashes/fileHashes.lock index d4433821332940c8557a366779ff0cd43702ddea..f3cb0d8c873d1cd7a8e7f7e5340bbc04b426d09e 100644 Binary files a/.gradle/8.8/fileHashes/fileHashes.lock and b/.gradle/8.8/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.8/fileHashes/resourceHashesCache.bin b/.gradle/8.8/fileHashes/resourceHashesCache.bin index 894cf647a0ab62100a9601febad51b97f0517e2f..f1816dbf4dc49178890d6a09e8dc1dc35abf5ddb 100644 Binary files a/.gradle/8.8/fileHashes/resourceHashesCache.bin and b/.gradle/8.8/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index fd5a8f18ac32dc830a810a4c6ae8e8f2322d11e9..8bb0f46bc417db6aa9df217dccf23f9f15f664d5 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/build/classes/java/main/matrix/CoordinateIterator.class b/build/classes/java/main/matrix/CoordinateIterator.class index 510e71e03735dfe566c742ba4e40ab0aeb46fdc9..b4474f14429e175bd7e8ae1db3b004535e7e16fc 100644 Binary files a/build/classes/java/main/matrix/CoordinateIterator.class and b/build/classes/java/main/matrix/CoordinateIterator.class differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CellularAutomatonSimulation.class.uniqueId13 b/build/tmp/compileJava/compileTransaction/stash-dir/CellularAutomatonSimulation.class.uniqueId13 deleted file mode 100644 index 28f441ca87e3830ef05866616d5278961cb240a5..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/CellularAutomatonSimulation.class.uniqueId13 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ConstantCellInitializer.class.uniqueId7 b/build/tmp/compileJava/compileTransaction/stash-dir/ConstantCellInitializer.class.uniqueId7 deleted file mode 100644 index b4cee6eb41e43d303236da1aa2cc89c598ff6795..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ConstantCellInitializer.class.uniqueId7 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ConstantMatrixInitializer.class.uniqueId15 b/build/tmp/compileJava/compileTransaction/stash-dir/ConstantMatrixInitializer.class.uniqueId15 deleted file mode 100644 index dbfb570ad41968cd3d1de1887b287ef9bb481d2d..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ConstantMatrixInitializer.class.uniqueId15 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/Controller.class.uniqueId6 b/build/tmp/compileJava/compileTransaction/stash-dir/Controller.class.uniqueId6 deleted file mode 100644 index 1d24f5e49304d4651517c9f6a98619faee8e706f..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/Controller.class.uniqueId6 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/Coordinate.class.uniqueId3 b/build/tmp/compileJava/compileTransaction/stash-dir/Coordinate.class.uniqueId3 deleted file mode 100644 index adfcc72f316036d9ac9cbaf3d7a25b6939bf8240..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/Coordinate.class.uniqueId3 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoordinateIterator.class.uniqueId16 b/build/tmp/compileJava/compileTransaction/stash-dir/CoordinateIterator.class.uniqueId1 similarity index 100% rename from build/tmp/compileJava/compileTransaction/stash-dir/CoordinateIterator.class.uniqueId16 rename to build/tmp/compileJava/compileTransaction/stash-dir/CoordinateIterator.class.uniqueId1 diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/FillingMouseListener.class.uniqueId9 b/build/tmp/compileJava/compileTransaction/stash-dir/FillingMouseListener.class.uniqueId9 deleted file mode 100644 index 591c5a91de905231d9d4015bb17a2ac9fc4dd7e4..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/FillingMouseListener.class.uniqueId9 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ListMatrix.class.uniqueId11 b/build/tmp/compileJava/compileTransaction/stash-dir/ListMatrix.class.uniqueId11 deleted file mode 100644 index 440bfa8caa12668dd9b18b1f5709cd4d21226661..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ListMatrix.class.uniqueId11 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/MatrixInitializer.class.uniqueId4 b/build/tmp/compileJava/compileTransaction/stash-dir/MatrixInitializer.class.uniqueId4 deleted file mode 100644 index 13704b631e961c3106d366f90a28b1d8338a6ba2..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/MatrixInitializer.class.uniqueId4 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/MatrixIterator.class.uniqueId14 b/build/tmp/compileJava/compileTransaction/stash-dir/MatrixIterator.class.uniqueId14 deleted file mode 100644 index e38b2c1d6c455ec498d36936bbacc66f42d61431..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/MatrixIterator.class.uniqueId14 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/MatrixPane.class.uniqueId10 b/build/tmp/compileJava/compileTransaction/stash-dir/MatrixPane.class.uniqueId10 deleted file mode 100644 index d9f62f085e54ebfeade6227714692731154c4c01..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/MatrixPane.class.uniqueId10 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/MouseListener.class.uniqueId2 b/build/tmp/compileJava/compileTransaction/stash-dir/MouseListener.class.uniqueId2 deleted file mode 100644 index 61a64b0064a5c3170d2e0f7a6389ed7a15be7350..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/MouseListener.class.uniqueId2 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/NextGenerationInitializer.class.uniqueId1 b/build/tmp/compileJava/compileTransaction/stash-dir/NextGenerationInitializer.class.uniqueId1 deleted file mode 100644 index 51521ffd32a0046c74f1eddf3aca0924cbcc55a7..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/NextGenerationInitializer.class.uniqueId1 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/Simulation.class.uniqueId12 b/build/tmp/compileJava/compileTransaction/stash-dir/Simulation.class.uniqueId12 deleted file mode 100644 index 99050b0840eb144a4a29cac34e09d3d6e03ea560..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/Simulation.class.uniqueId12 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/SimulatorApplication.class.uniqueId5 b/build/tmp/compileJava/compileTransaction/stash-dir/SimulatorApplication.class.uniqueId5 deleted file mode 100644 index 75fd7f257f694cb74372cc8dcff547d46f9acfb5..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/SimulatorApplication.class.uniqueId5 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/WaitingMouseListener.class.uniqueId8 b/build/tmp/compileJava/compileTransaction/stash-dir/WaitingMouseListener.class.uniqueId8 deleted file mode 100644 index 5991560323e72bd7e913304f66d7888f14a286c3..0000000000000000000000000000000000000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/WaitingMouseListener.class.uniqueId8 and /dev/null differ diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin index a0fd561f89ce1b6071732b66d4cc445c46b4cd8e..a0c72fc96d493d57160b9feb7e96516cfe9701c9 100644 Binary files a/build/tmp/compileJava/previous-compilation-data.bin and b/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/src/main/java/matrix/CoordinateIterator.java b/src/main/java/matrix/CoordinateIterator.java index 810b71287e52821943a45e52eb7959ace9df7f06..726315ce8da8e8cb2cec4129a425aec4bf143fab 100644 --- a/src/main/java/matrix/CoordinateIterator.java +++ b/src/main/java/matrix/CoordinateIterator.java @@ -15,8 +15,15 @@ class CoordinateIterator implements Iterator<Coordinate> { * @param width The width of the coordinate range. * @param height The height of the coordinate range. */ + private int width ; + private int height; + private int x; + private int y; public CoordinateIterator(int width, int height) { - // TODO: à compléter + this.width=width; + this.height=height; + this.x=x; + this.y=y; } /** @@ -26,8 +33,7 @@ class CoordinateIterator implements Iterator<Coordinate> { */ @Override public boolean hasNext() { - // TODO: à compléter - return false; + return x<width && y<height ; } /** @@ -38,7 +44,14 @@ class CoordinateIterator implements Iterator<Coordinate> { */ @Override public Coordinate next() { - // TODO: à compléter - return null; + if (!hasNext()) throw new NoSuchElementException(); + + Coordinate Actual = new Coordinate(this.x, this.y); + x++; + if (x>=width){ + x=0; + y++; + } + return Actual; } }