From c606b50cdaa4c3f577dd90d020b2b964549efa14 Mon Sep 17 00:00:00 2001 From: Thoumi Ngonga Brice Date: Wed, 8 Feb 2023 15:44:57 +0100 Subject: [PATCH] Update Methode void BuildGui --- src/main/java/BattleShip/BShip.java | 18 +++++++++++++++++- .../AIGridGUI$DirectionCompare.class | Bin 1093 -> 1093 bytes .../AIGridGUI$SetShipsListener.class | Bin 3153 -> 3153 bytes target/classes/BattleShip/AIGridGUI.class | Bin 10308 -> 10311 bytes target/classes/BattleShip/BShip.class | Bin 262 -> 1272 bytes 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/BattleShip/BShip.java b/src/main/java/BattleShip/BShip.java index 13029cd..cda0dd8 100644 --- a/src/main/java/BattleShip/BShip.java +++ b/src/main/java/BattleShip/BShip.java @@ -1,8 +1,12 @@ package BattleShip; +import javax.swing.*; + public class BShip { public GridGUI grid1; + JPanel thePanel = new JPanel(); + JMenuItem[] boardSize = new JMenuItem[3]; public AIGridGUI grid2; int rows = 10; int columns = 10; @@ -19,6 +23,18 @@ public class BShip { buildGUI(); } - public void buildGUI() {} + public void buildGUI() { + + thePanel.setLayout(new BoxLayout(thePanel, BoxLayout.PAGE_AXIS)); + + + thePanel.add(grid1); + + //Setup menu with options for new game, varying board sizes, and auto placement of ships. + boardSize[0] = new JMenuItem("8x8"); + boardSize[1] = new JMenuItem("10x10"); + boardSize[2] = new JMenuItem("12x12"); + + } } diff --git a/target/classes/BattleShip/AIGridGUI$DirectionCompare.class b/target/classes/BattleShip/AIGridGUI$DirectionCompare.class index 6155fb49f239808eacdc7f7d42973b6018a0b34b..a2264253294d15852ab9731b2a3bf8384720dbd0 100644 GIT binary patch delta 25 fcmX@gag<|2G&AF-$uZ2qj9VseV2%K?IazD~cX$Yc delta 25 fcmX@gag<|2G&AGI$uZ2qjGHHKV2%K?IazD~cUK62 diff --git a/target/classes/BattleShip/AIGridGUI$SetShipsListener.class b/target/classes/BattleShip/AIGridGUI$SetShipsListener.class index 9cd9da1946bba58d721ae48c1b9e39e1babb43f1..a43d2b181f002f901269434941a0339db4a73891 100644 GIT binary patch delta 158 zcmWN~y$-=p0EXf3+YV>4H60AZV3Am@RvU?_BNI0vaRnzXp}WK)678VGPl}R;pkW~K zcLzwE@qL#kFao1n6C9|zD945nbdaE{nljsa35(W9FApZiNOOWBr>Js<2IpvTfi`_~ zxP;9W`dq`&?QsL2TZ9Y|agQ4h`0z-RC#D!N$20T1u)wRb<8JJ(g@;C;8ZD`>OsbvC J@U4Eb@&_T%HV*&* delta 162 zcmWN~JqrPG0LSs)Z~LFK*sd!EGFX&JS*CdyhLf&;|p%7&ileuPD9q}CWFJ)}56kyBJSL!EOpxj>6c zwCTg<3O%mjs`ePb=LS1&ab}1+_xSQalSd|bVwM-?cx8b%X-9_ILkUlXz7$>mJO8 N4E3~h^n^5{`9JVXHe>(* diff --git a/target/classes/BattleShip/AIGridGUI.class b/target/classes/BattleShip/AIGridGUI.class index 7a306b2853d54d84993e3ef82088f279a6911a90..7c2fc5bd672961764cb2ddde77c063b5c96e8690 100644 GIT binary patch delta 1178 zcmWNQeN5G56vw~c^ZXbAUXWM4@*)IyK}8`*Lx>8}3er#nG1H77M~uh>U)ye&E*xUQ z)qFv7m^T-wwOti+W@a@pEZUN4V_7OjLvf->GD*=h^prK0Dv!pUeL&Ex__# zR#xqKG@#1MnF0$o1i&BTbd5(4CL#<|^_GSRiQ$YU*@X9H$)7v|87c|3*!o0USdOQ#0<%%A9%?kZ603Eu#TvYiwP?mV9KhQ+q5Em9$5(h4 z-(dqTtIJ+J_oEI2*o+}G&<~p#h^-7mBkkDEG|i!_GB*gj`2w0b4|`dR57pB? z&)}Fk+TGgakF}czF%53j(~3N_sg^^oCVL@2_55XTv7ARCIHo|3D~@)IRyo1=TydO) z9jDaPX*KmFvT+9URpKIijU_mT3UsLS^D46go6w0ST)2)gu_ANAD*e2bs7 z;%9W@7xXBiOS<+crhYvQ;CKA%#2>V9nZCG68+th!*Ek-3(t$oEp`XdP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90P*3RI~E+OCGGQk<&QNJrIJ$JIoq6tBp6CFru6>539v zLnXNcCA;Qo?!vmqwN{$zpmf(!8E$|wU9noYQ3|^Wy3b8fmYbz)H%BeqQsuZc%6042 z+Eu8H`$+BG9(8aBmFJG?A$MF|+*x&Z7u3W3qu%bW`uHa5>ywlp@!5LBx6-5jK|SWX zYKZTnVqd7CzDUFTNR9AgG|HFgNk3gq(KuhO@qU{o`kgBA`!vZP)?|NL zrT(Ix^?z!ruhn#4ry2g1X8Ajs9n{mDpt0r#iJBLrYkm;cf*@C!k)Xd`3I=ImP^3jc zv0e*CXmL=YB|)j)h*gGHy3lg!YXyz0w;@HN1z9sfYt8dEN%mAyv_5(ut1R>$fi{z- z_sLL2v~Tvb&=&J-B|+Or)Q;HR>{W{Vh0_)4sg^ihx6t2&RY!Z>V32N7Z2M9Ak8!%g zGY;lDvCMg*_R==F`c%3GRJn%ic5xhXA!;n=m`mi0OQOytbIWwA@6r@<=}K`Krd6hC d5mqOcXuZ!-pXiaC6KWORl53wq^jz+Q{{bil5cB{5 diff --git a/target/classes/BattleShip/BShip.class b/target/classes/BattleShip/BShip.class index 5809f278ff7e8939575c60289d36030ff7ab2d11..7a62b7a6f05a1170e1c45ddc5d010d455549e36b 100644 GIT binary patch literal 1272 zcmZWpi%t_!5IvVZwp~`KJQ$#yH%U+`;8 zC`}~#0e+Nm?zWT_vgzJCb7#((nLW3E{{H+8U=8nN^uZ&+tH1|8L+FTq;qfXr4&pnd zBdu&R_*Zp9x7Qgw(b%4Z07F;=HRJUYox-+uxuI2MNbm&F4@JTa1vfE3SZQwCRjqia zAIH<;%@D8;H7A~7D1RL#CE*ss@P7vd&1mFottP++6%1jRAy_iGRVnJDn9DSSFPh86 z_C)rqf;rqH&jCdxL?72PQzG@gf~Xj&uhh`16$vWEx5F&**rcH(mYRvB0N#jgvYDXycr#{&1Tc`NCbk>3 zl4iZ)!b%7*15sN~Q zn5Mb+(WUW&2?fv&Lg&s(s-%^P@8{SgI%g%F(dwZSx?S|nk@eZJfjPAerk+FEZzI@( ztonZ;)IwMd$t{dH@5m2|@52_oM+gD*^CCc;L5xy06HxG$yb2)`9`Y#A%COzzs#1nH zOA^n-zIsZyr--yM*}@F%X3j8ACo$K_gBBjDXIQ$*9L69$5$bb+xD#}(E}4@(W)fw$ z%kN$00@29lSQZqrzm3OdSP|O}`|3wp!=7`5_QNmRNEe0ab4~*RcF#rGn delta 125 zcmeyt*~Y|m>ff$?3=9mm3<49mOauj-5=%;QQiC%x3-p~p|@)#NTfFu(G FKLBOI5gPyi