From 49262c4954dab148c8e63ac74c3836ae739e9503 Mon Sep 17 00:00:00 2001 From: peet Date: Thu, 13 Jun 2024 15:02:04 +0000 Subject: [PATCH] refactor --- bin/uebung05/logistics/demo.class | Bin 0 -> 897 bytes bin/uebung09/chess/Board.class | Bin 1081 -> 3350 bytes bin/uebung09/chess/ChessApp.class | Bin 1401 -> 3879 bytes bin/uebung09/chess/Color.class | Bin 554 -> 957 bytes bin/uebung09/chess/Knight.class | Bin 823 -> 1439 bytes bin/uebung09/chess/Piece.class | Bin 1078 -> 1689 bytes bin/uebung09/chess/Queen.class | Bin 820 -> 1708 bytes bin/uebung09/collection/Set.class | Bin 999 -> 684 bytes bin/uebung09/collection/SetFactory.class | Bin 1034 -> 919 bytes bin/uebung09/iterator/Array2dIterator.class | Bin 0 -> 832 bytes src/uebung09/chess/Board.java | 5 ++-- src/uebung09/chess/ChessApp.java | 2 +- src/uebung09/chess/Color.java | 2 +- src/uebung09/chess/Knight.java | 2 +- src/uebung09/chess/Piece.java | 2 +- src/uebung09/chess/Queen.java | 2 +- src/uebung09/collection/Set.java | 2 +- src/uebung09/collection/SetFactory.java | 2 +- src/uebung09/iterator/Array2dIterator.java | 25 ++++++++++++++++++++ 19 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 bin/uebung05/logistics/demo.class create mode 100644 bin/uebung09/iterator/Array2dIterator.class create mode 100644 src/uebung09/iterator/Array2dIterator.java diff --git a/bin/uebung05/logistics/demo.class b/bin/uebung05/logistics/demo.class new file mode 100644 index 0000000000000000000000000000000000000000..33773c74c312c71a0b53c602bb56e0e7bd52ba3a GIT binary patch literal 897 zcmcIj!EO^V5Pc45lPrOhKnoQYtEbRI!vQW7AyEpa6(CxQ5GSv9v~laTS6*+$m9Ihq z3GRFpVzwm>pd7gL;IU`?_RaXs?2n&cz5#fO%^o@ew;ReDSKNO%wZ1TQG`gPVRQeve z0&B1n7*r{Jq6(5*7u9UZ+*2)`kFr!z&tzmgeXO{e zKk@Tt>?}S!r#5BfLzEX`sg-NVGLrMsE(4gFNMYYlO?GLGfV?EyX>u zap`@6KCTV1g6jh7lXM~dK@7$fyKQSmsd4nODKiR(iq#evr(P?2q=ISv-@$I2nOa~o zoh$gyAnbCJOJ$tE#^l4YOnqz!eEN?@U#=tq$$@WzrWdAt>tLUUc&8Nx52FC0Sa1*yU(lTuS#jw7F;qDnj Mo0oqzwjJF01@&kEJpcdz literal 0 HcmV?d00001 diff --git a/bin/uebung09/chess/Board.class b/bin/uebung09/chess/Board.class index 0c92eac39b1436a5d4c976b2b7e1f79f643a8c7a..b8dbe642e4dc1f0964087c6fbb0deed27b340e75 100644 GIT binary patch literal 3350 zcmaJ@`%@d&75=UeULh|A%f<#n;>E8@2rQe}j)RC3tk{Vfzz%Zk+N6(VwT3mzuDZJ- z(9ot2_nAJDwrP{}mA1+7Q)k*vhSa3fuEcsp&#)CPFP#C7MT{W-V7C6z!$Ca5orV->bQKmLh zlww7lSMdZ!1P(6f^Jc+y3_ZAE1#?{af$jvPWs9*ox!aAkF`!Wut=J`37gQ)n?8ei$ zs9;QB&(dbY1yHnp@)tXF}x|MAsSt2=0r2+d3oTu9*+MN>B`mM1_&UBJkTi6spjV>a{eK(EtrS{t zK7}~WOZUI6;yd^*F`d)>$*5n707S)nL1R> z-=l|oGCD81Zr}%=UYRh1Ik)U5@e{nE;B|pxn+ah#i|)Lci^7dc__8iP1Iv=~p9;Ly z*bZvik-_J5r)-=4v2oX(uU7Kgv#dd~<>0mDin)XObc24qo*P6p69wJ2ON1leu?s&= z;7ul_ZnNgf%bIH#RTh6)n_1RG0>31{LQCLnCdrB>SHEH+umye;{)WSQoKAY_2T7h zY2X7qnZ1XnVz}`anr(q}Tc9v?pFynamEokHIX#|JvK=qCQtk>-eU`|AkegHYDE)CGy~1fp;E! z!b`%%o0}92Fu{QgeIFq7S&Z<1(o=-)S)3%KrwC*g9`|42A0P>Plx-`uSPxF3Ug}nR{h1|rFIOQi6 zrA)rfq|U*}zzQ@bIeW4so6_VtY*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E^X(l#2U`X-hI%C2$nWnR*fJCW4+nwW2?9RazdjlJ z26TqvEq~y)$Nj#2=H7~4XduH-j@2lXp8XxokZDO@hHZwLb#>L9&TBR<7;@*b@AEJU z1jA;_Ih>7ZQ?BF0!TQnQT9`;-J`V#63@J-73SH@o)9B6>fx}&oNagOJ$Gr<4Nac@3 zJ-m@ahVAa3b2b^$oYUwGmERg?s7@9b-G3Lc{-(ERnl_a%Zusz2JcjWYmkhceI~A)j zdkEB!)u22E^L!8mJ#j46oRz5y+Er)F(E0r!XR(PgacfC;sDs*~FHH|bSp!*U$dRYP z#2nc(QZ=&aomb>v;;;g(W-Ml*)2>K

oqW%4K-i>OfQ67BP3l~ST8(7uLcS{1xa zR{hgbPqe0>$eCCv#MC5H8&iK+N=aBNSf$EI!)udF_B_R0`WI8fy6OlUW9sG?sTZu4 literal 0 HcmV?d00001 diff --git a/src/uebung09/chess/Board.java b/src/uebung09/chess/Board.java index 2cfa92a..1d8cfe1 100644 --- a/src/uebung09/chess/Board.java +++ b/src/uebung09/chess/Board.java @@ -1,9 +1,10 @@ -package chess; +package uebung09.chess; import java.util.ArrayList; import java.util.List; +import uebung09.iterator.Array2dIterator; -public class Board { +public class Board extends Array2dIterator { private final Piece[][] field = new Piece[8][8]; private final List pieces = new ArrayList<>(); diff --git a/src/uebung09/chess/ChessApp.java b/src/uebung09/chess/ChessApp.java index 3b6442c..634d9f9 100644 --- a/src/uebung09/chess/ChessApp.java +++ b/src/uebung09/chess/ChessApp.java @@ -1,4 +1,4 @@ -package chess; +package uebung09.chess; import java.io.InputStream; import java.util.NoSuchElementException; diff --git a/src/uebung09/chess/Color.java b/src/uebung09/chess/Color.java index 3d5151b..03e10a8 100644 --- a/src/uebung09/chess/Color.java +++ b/src/uebung09/chess/Color.java @@ -1,4 +1,4 @@ -package chess; +package uebung09.chess; public enum Color { black, white diff --git a/src/uebung09/chess/Knight.java b/src/uebung09/chess/Knight.java index 815cfee..25e7ede 100644 --- a/src/uebung09/chess/Knight.java +++ b/src/uebung09/chess/Knight.java @@ -1,4 +1,4 @@ -package chess; +package uebung09.chess; import static java.lang.Math.abs; diff --git a/src/uebung09/chess/Piece.java b/src/uebung09/chess/Piece.java index 5b6a716..066cb15 100644 --- a/src/uebung09/chess/Piece.java +++ b/src/uebung09/chess/Piece.java @@ -1,4 +1,4 @@ -package chess; +package uebung09.chess; public abstract class Piece { private Color color; diff --git a/src/uebung09/chess/Queen.java b/src/uebung09/chess/Queen.java index d75f4b6..ed07b49 100644 --- a/src/uebung09/chess/Queen.java +++ b/src/uebung09/chess/Queen.java @@ -1,4 +1,4 @@ -package chess; +package uebung09.chess; import static java.lang.Integer.signum; import static java.lang.Math.abs; diff --git a/src/uebung09/collection/Set.java b/src/uebung09/collection/Set.java index cdcb82d..00171e8 100644 --- a/src/uebung09/collection/Set.java +++ b/src/uebung09/collection/Set.java @@ -1,4 +1,4 @@ -package collection; +package uebung09.collection; /** * A set of elements that does not contain any element twice. diff --git a/src/uebung09/collection/SetFactory.java b/src/uebung09/collection/SetFactory.java index 1359aca..f8cfeb3 100644 --- a/src/uebung09/collection/SetFactory.java +++ b/src/uebung09/collection/SetFactory.java @@ -1,4 +1,4 @@ -package collection; +package uebung09.collection; public class SetFactory { diff --git a/src/uebung09/iterator/Array2dIterator.java b/src/uebung09/iterator/Array2dIterator.java new file mode 100644 index 0000000..91909d4 --- /dev/null +++ b/src/uebung09/iterator/Array2dIterator.java @@ -0,0 +1,25 @@ +package uebung09.iterator; + +import java.util.Iterator; + +public class Array2dIterator implements Iterator{ + + + public Array2dIterator(T[][] aaray) { + + } + + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + return false; + } + + @Override + public T next() { + // TODO Auto-generated method stub + return null; + } + + +}