From bc7d4a53814716631b5567c892d3054702cfed23 Mon Sep 17 00:00:00 2001 From: EggyMath <55564321+EggyMath@users.noreply.github.com> Date: Fri, 29 Mar 2024 16:45:20 -0400 Subject: [PATCH] Refactor and Image addtions Made and added images for new contradiciton rules. Also refactored NoCellForNumber rule to NoCellForNumberRegion. --- .../NoCellForNumberColumnContradictionRule.java | 2 +- ... NoCellForNumberRegionContradictionRule.java} | 7 +++---- .../NoCellForNumberRowContradictionRule.java | 2 +- .../images/sudoku/NoCellForNumberColumn.png | Bin 0 -> 958 bytes .../images/sudoku/NoCellForNumberRegion.png | Bin 0 -> 1077 bytes .../legup/images/sudoku/NoCellForNumberRow.png | Bin 0 -> 916 bytes 6 files changed, 5 insertions(+), 6 deletions(-) rename src/main/java/edu/rpi/legup/puzzle/sudoku/rules/{NoCellForNumberContradictionRule.java => NoCellForNumberRegionContradictionRule.java} (92%) create mode 100644 src/main/resources/edu/rpi/legup/images/sudoku/NoCellForNumberColumn.png create mode 100644 src/main/resources/edu/rpi/legup/images/sudoku/NoCellForNumberRegion.png create mode 100644 src/main/resources/edu/rpi/legup/images/sudoku/NoCellForNumberRow.png diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberColumnContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberColumnContradictionRule.java index 64db5ff37..4cf076892 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberColumnContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberColumnContradictionRule.java @@ -14,7 +14,7 @@ public class NoCellForNumberColumnContradictionRule extends ContradictionRule { public NoCellForNumberColumnContradictionRule() { super("SUDO-CONT-0003", "No Cell for Number (Column)", "Process of elimination yields no valid numbers for an empty cell in a column.", - "edu/rpi/legup/images/sudoku/NoSolution.png"); + "edu/rpi/legup/images/sudoku/NoCellForNumberColumn.png"); } /** diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberRegionContradictionRule.java similarity index 92% rename from src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberContradictionRule.java rename to src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberRegionContradictionRule.java index 9c53df794..9923bd207 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberRegionContradictionRule.java @@ -3,19 +3,18 @@ import edu.rpi.legup.model.gameboard.Board; import edu.rpi.legup.model.gameboard.PuzzleElement; import edu.rpi.legup.model.rules.ContradictionRule; -import edu.rpi.legup.puzzle.sudoku.Sudoku; import edu.rpi.legup.puzzle.sudoku.SudokuBoard; import edu.rpi.legup.puzzle.sudoku.SudokuCell; import java.util.HashSet; import java.util.Set; -public class NoCellForNumberContradictionRule extends ContradictionRule { +public class NoCellForNumberRegionContradictionRule extends ContradictionRule { - public NoCellForNumberContradictionRule() { + public NoCellForNumberRegionContradictionRule() { super("SUDO-CONT-0001", "No Cell for Number (Region)", "Process of elimination yields no valid numbers for an empty cell in a region.", - "edu/rpi/legup/images/sudoku/NoSolution.png"); + "edu/rpi/legup/images/sudoku/NoCellForNumberRegion.png"); } /** diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberRowContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberRowContradictionRule.java index 28fc9a49b..6e8616a9f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberRowContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoCellForNumberRowContradictionRule.java @@ -14,7 +14,7 @@ public class NoCellForNumberRowContradictionRule extends ContradictionRule { public NoCellForNumberRowContradictionRule() { super("SUDO-CONT-0002", "No Cell for Number (Row)", "Process of elimination yields no valid numbers for an empty cell in a row.", - "edu/rpi/legup/images/sudoku/NoSolution.png"); + "edu/rpi/legup/images/sudoku/NoCellForNumberRow.png"); } /** diff --git a/src/main/resources/edu/rpi/legup/images/sudoku/NoCellForNumberColumn.png b/src/main/resources/edu/rpi/legup/images/sudoku/NoCellForNumberColumn.png new file mode 100644 index 0000000000000000000000000000000000000000..9dcade64b2fb79be751848670324692e7b464cce GIT binary patch literal 958 zcmV;v13~Px&cu7P-RCt{2oWE|{Fc62&MF))<`XUzK#XyG|=+Ni!%*l^cAWMOGFu=S>2M--I z6iA0!jigW#?|2fg((eO;1djX%`g}a{MBUEc{42Gn4i)*Er!iuVNjZMYeBeF-CwE>x zat^KzRp)mbNYa5N1Sfrd*h3bW7YH#1gcu{3LqbU#EJIMpD-pdYCGh>BqMgbsZG+&D z^>XvHSBR4Rp;8mO6$W!isuakOF`Cq+QXoUlkuw@xU5kk1@ z42hKf|F_I&QkO3JF#D1-C?vHUGA3o~Q7}eOh*oV1k-{gKLv}<&GoQ$*T(VVyLN1q! z>YF&{R9~;p{~$JYn9jN{3%TSyqH3>IEDGjEFLo{(144`eA;w4&GWYChi-?6l#yp6G zIOnJ=OYP4BC?P`5=d#AJ5s|J6k6Q zYtdl^baHsmEvKFI&$WY26S?GP}eopb)EZTEZ@n&YIIm((M}FAci_e_$FP!n zsA@nh%NU{vX%ADJAuHxC+^w^CCkF@^hb3gHlLJU6T1adshZqng!$b+;c5(o6CWS~l zIZS~l34=}!#u%LTYISlLdkyUxu5a?nJ-WHSNreC_+x(PW1HsiTu@5Q52ZgD#8|W{BrE3 z3A2IHi7_C=7!YC%2r))5sbeae4{UNU28JwSK!`CQ#264_3yOtH2F`>4l2P;C_ gZBv_{_TwO(KSVOPa4)&_O8@`>07*qoM6N<$g6E{9PXGV_ literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/sudoku/NoCellForNumberRegion.png b/src/main/resources/edu/rpi/legup/images/sudoku/NoCellForNumberRegion.png new file mode 100644 index 0000000000000000000000000000000000000000..000dc8b68935563c869c695b114190eac7499805 GIT binary patch literal 1077 zcmeAS@N?(olHy`uVBq!ia0vp^DImV1DoE;uumf z=k1)me$tKt$N&2Y6uk`p=oNk>s4K#2;`4rb9xS z7iK=SsK4{>OjTNb-K1^@iM$_o@6}b*3zKK1sW$F0Z5C)l(Hs9l}f z^X*5i;>;_WlV*kS)yv6u_uOaS6dL9gwERxwt;h4ZUT!j1TWNPPqraZ($?pkvo<~&{ z+x|10G;Qzij7e2dzxV#0Iz@H)w;$~Zf=qi&Qf>9PFDPYX7BX0`12JonP$_7uTOJjLr~g}(jhe518xwdlFc%4K$?H*eL33p@`}XsTDGHtIQ#o$WvU9?^ly7T&Zh6Mm?bEUQXXw%DVPic> zk~d;l5Z>R?_#QR`O`wi_4*YwV@p4f8L}zC^ID7 zQOWF=cb+uiXp&>8to(}Cv%V^v5AFN=D|tguP~r>$6trO~V`<=Z)1N_`SLbyV?YtAW zuSjodqmNV4^(V(O_7}SNUgteh7~HzSe$%U6$5MDJ6&= zvfa~o{rI%slb+jXx!XmmmuAiSc{nuBd}p!vrozK&OJ<(9Eo^l>_L`Wp?$dAIbsKDo zf&O3D{ao(TzXQkFlTLn|!KIm%ydsuuK@A^g;nc$wHpgDoxk_!%=0B>bxmsXa>@U`a zx3BlFOr4V~zo@DuBR;S+@QO?jlbVYJ1bMa=9ZT$bJ$>okciL?CiRK zjpD*(@z(+ZuIguVtav>=)Jp4j>Q>JF6PD9XeSTleaNyZ}wi}=1vNpZFa=0$|t$2Hn z8%rtgjX%d_PVZKoR_^_Sz5ipynO&M;clBRCd&YKPcF)`?@g_lO_tS3txx44L)Yodg z+>r05tM1vA*C%_6{IB${aRc&q{j21Cklf0B)#j1>pZ3UUzj@Yo)I~Dv?I~WkD?Uu4 zF+1oxzue~ao9}v;y6=?vyX=tQK~t-+@2l^2OK<(V=^X2KnM0cl-(1euD&>?B+gw<~ zrz&DF)8~eK?r|b literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/sudoku/NoCellForNumberRow.png b/src/main/resources/edu/rpi/legup/images/sudoku/NoCellForNumberRow.png new file mode 100644 index 0000000000000000000000000000000000000000..f984f836508fbc3d6f0dce4d9b749f5e53de8d87 GIT binary patch literal 916 zcmeAS@N?(olHy`uVBq!ia0vp^DImVD|HLaSW-L z^LFmWyxRsMuJgNjq)flK`#3oBl&omv`zv>T)}Kh$O)MSk%xC&bPOQ+K8F8a2*YnBZ zd#csv=l!sgw+mV%lJ@xgzhDlY`)imdWNWbSa4|MJ9atb>fW(}qV|S(W+@oaihv)A- zDZZ(gFr&odK$eKzpL-(rTv}e zMq{QoAme+oS|aR^Us%MYINiuA&fY~!P)H-T&BN8{*88=kETUcFn|^N;7M$3>U;db9 ziAGe%>p47!6?`v;7{+#r=&5}8_A5=+u~)0*ipxf)L$?B@k8%l4Ty?F_p>TG0W1_?w z<&=dl_*PC#vR<-nrPcvHOiuy*cUk&yRGiO+7Fnh?&-N?3-Y#Uc2Kirkwt(J^!j!iH zCYtMt3uYcGIK_k!B%3%K_g`~Y%Wf|aF0`Dp2^3(9=C>EjJ#kp=Ykk1cu9I8$E#VV+ zU8*1Hk?>A@W7t9OqY>R4D>ymt{8n1SHBYEnNoj$e3(Mz}){PQVVv;w-q_!qa?Amvx zX-c-wG(N?TIW8?u4HdJj7QPL3xi>Yc=CZW(p zor_s6c+mFH+uw12{p{HPJy}0*d)8XTll7O%EFT5A$48j!UFX+zoMp-U@5%qUInU3> zxq3~SP?(q))uCJV=jihZij(Gj7JAEUv3U8KYSzrRnwcBJ{4Q%|XO(339S|vc&Lebd zTj*`cIGvO{Mya5nWvfk#o>hF>k#QQ2@#E!F3`Y22N%uG!+zUgxUM2u-s3x+XM7 z(^B40(kq%sZU$yE22WQ%mvv4F FO#n+HlXCz7 literal 0 HcmV?d00001