From 440eed0e9d2aef20749bf92662b6147a238210e6 Mon Sep 17 00:00:00 2001 From: peet Date: Thu, 13 Jun 2024 18:15:48 +0000 Subject: [PATCH] started on b --- bin/uebung09/chess/Board.class | Bin 3350 -> 3333 bytes bin/uebung09/chess/ChessApp.class | Bin 3879 -> 3913 bytes src/uebung09/chess/Board.java | 6 +++++- src/uebung09/chess/ChessApp.java | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/uebung09/chess/Board.class b/bin/uebung09/chess/Board.class index b8dbe642e4dc1f0964087c6fbb0deed27b340e75..82380788113cee57e3c3a5bb451382c16c8d707f 100644 GIT binary patch delta 203 zcmbOx)hadNBV+%>Pe}@T3cjVqB?_q(1v#0?nI$=u3YmFj`Pr!oiFx@Y8L35^TN!QH z85t%Y=Fny2p8S!cOICn^gF%o%2ngjFgc+0>L>NpML>b%}#2A7Y#3#?-JZ2~bR3XhE zz#sz@mt|07kYi8-s?}vsV6Xx5Jc0ZmpuQ*u6^10BnrsHO$^BeijGB|BxR0yqGKe$i q0afWUSTPtd*fSUcO*UeP1lo}S6e|LnQq5pCnT=;Fqvhm1JW&AKvMNCU delta 220 zcmZpbnkF^jBjbXJpOOp}((;QGQc}|rOLIyTlJoP5ONvU9OY)2K6nsmIOF%N2d8rDC zc?zi&1v#0?nI)S`7;V`Z87FVz&}C$w{D7lNmWP3ZftNvufsa9+fuBK{L4d)8L6E^6 zC=$dVJh`3on4uU@g*Z@LfJ9F<0w;C=8NIIZ60mJC{T_A{{C@LrdV)V%fw_%jIgEMy&N}ICs zqpY-3sbpoAPNjW7I;f;(4}HB6wEpfsJzl^z<$6&7xX(4?ngSD)@!wH53#*c;k zE4IkKSjN4W$C;&lre6fvWSh?8dZ^Fe)*a9^HR?nSmKitd_zp{vYq^Xf6g$XGgNzxN z$xm542_II=SYrfp_D4gSULOfWdyG&`GMbI!tnNrS9MF22B9VRvO0ix>3pNm>NL*)_ z(qu*rMf@$s?KVBC2Et1uw2{AdH5v|S0bM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BqU~Cuk#RmtqSbs1cAF^XHf(qKu&YeP8bq5)B>50K;OiSrxv>9CzLJYG_CegUR z!$1tB61qm0yboKrE-YsE^TUE$-i!wnY{P?mQrIBZ;b8^a(ZlUxnXMQ768gAbEE04) z!du1iHNA)^h++qW9MO`I=6Jtu#$>%gbU?wNK~#+B149mY5LYl{Y*_mudf!ev5=co% z^0Q)zFpLp?Rdn0-DA$7H-sOq+9AO4iAEm(P((+55akan99>PQG25#~bC4 zZ35>doa1A%M?QcH49CgqsNKzfl~dxljEg*Cce5#e#O@U@Gq~uVi(j*=%+7zY?@Fsi zK~ZE>qnt=eu%iqMDT0e=)eI|XK+zOf_XNtP;OU-3E5hBR zDLEso#69L2D)>BL4@3yGSL~fct#=CPx^6-XTtI`@cL9wvkSZMn=FmJBg(xB5c_wsO z&YYO7q5lMAbe`$1*t~&-s8Cbo-EE+i!QbgUkH#!oyjiT9z(#db7M-TAw8=l`tduVA zLIH(gHicm39?rZoi_uLvV0H~Qg9sB1w5{T02;G7zhqCD2O0F8RcqpjeUYUh<0^)dO zcUu(wbRt*jSrVFk{$6X#(x3SVE~3u&N1dIj*C91;NxXfkJKs-D_l?iTR+WLdNKz z125tT7@cIKy+rfNbl!(qxPfvBy*JQ6GuLjLn?Bek5krgd2IMkE?}ODWDR(YEqpR|= zehNn`jkwJ(oy2Ro0JhB3VKJEj0mxWI7p$jVX`rjEo?#02&02Kh1V+f6jC3i+@H+V~ zq{4lJG=X$_uKu6P$(vl>{0}b8gujM>TZqeA;?jBxE@=?0f5_a53q7}aF6n%W)Ebri z7Ny;g@8sosdHF$JewddZ=j9oaGqGAk%s@>dBeanS2B~%1sFT{M5;ma<9rPM>nq+hD iLv22A0?v||1)t(Gk}~ni(wM~Ov@)LZOZWm;Q1Uk(GmFXq diff --git a/src/uebung09/chess/Board.java b/src/uebung09/chess/Board.java index 1d8cfe1..21e9b87 100644 --- a/src/uebung09/chess/Board.java +++ b/src/uebung09/chess/Board.java @@ -4,10 +4,14 @@ import java.util.ArrayList; import java.util.List; import uebung09.iterator.Array2dIterator; -public class Board extends Array2dIterator { +public class Board extends Array2dIterator{ private final Piece[][] field = new Piece[8][8]; private final List pieces = new ArrayList<>(); + Board(){ + + } + void add(Piece piece) { if (piece.getBoard() != this) throw new IllegalArgumentException("wrong board"); diff --git a/src/uebung09/chess/ChessApp.java b/src/uebung09/chess/ChessApp.java index 634d9f9..1fe9baa 100644 --- a/src/uebung09/chess/ChessApp.java +++ b/src/uebung09/chess/ChessApp.java @@ -12,6 +12,7 @@ public class ChessApp { private static final String BLACK_QUEEN = "Q"; private static final String WHITE_KNIGHT = "n"; private static final String BLACK_KNIGHT = "N"; + private static final String ITERATOR = "i"; private final Scanner scanner; private final Board board;