From d8a0ed6f5a275ffa41588fff9cece0d4ca74a30f Mon Sep 17 00:00:00 2001 From: Matthew Slowe Date: Sun, 15 Oct 2017 16:20:42 +0100 Subject: [PATCH] modes update --- Makefile | 3 ++- src/dir.o | Bin 0 -> 908 bytes src/grid.o | Bin 0 -> 4504 bytes src/rnd.o | Bin 0 -> 1624 bytes src/wordsearch | Bin 0 -> 13716 bytes uk/org/mafoo/wordsearch/GridFactory.java | 2 +- uk/org/mafoo/wordsearch/Modes.java | 2 +- uk/org/mafoo/wordsearch/Store.java | 22 ++++++++++++++++++++++ 8 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 src/dir.o create mode 100644 src/grid.o create mode 100644 src/rnd.o create mode 100755 src/wordsearch create mode 100644 uk/org/mafoo/wordsearch/Store.java diff --git a/Makefile b/Makefile index 332549c..0468b9a 100755 --- a/Makefile +++ b/Makefile @@ -7,7 +7,8 @@ SRCS = uk/org/mafoo/wordsearch/GridFactory.java \ uk/org/mafoo/wordsearch/Bounds.java \ uk/org/mafoo/wordsearch/CouldNotPlaceWordException.java \ uk/org/mafoo/wordsearch/Direction.java \ - uk/org/mafoo/wordsearch/DistributedRandomNumberGenerator.java + uk/org/mafoo/wordsearch/DistributedRandomNumberGenerator.java \ + uk/org/mafoo/wordsearch/Modes.java OBJS = ${SRCS:.java=.class} diff --git a/src/dir.o b/src/dir.o new file mode 100644 index 0000000000000000000000000000000000000000..b5c48b49bd7bb6c6ad63f0bc937e8e2fc3ba960a GIT binary patch literal 908 zcmaJYor4EOaR))Si>vArp!oxcA(9-+gE9y!X!k{Q5f~k{T5_*cePkU@ilZ zY1lCr?!j-XyW9iBIW&dV(*vtU!Cr*Gpjs+!mf~!{?=7Sr_c|DivmyCRilJKZBR|fl zzfvd_26@9m*SKSPgO1@ywOp??{Boqb;m2xNQC(e0c62OpjZdJ*x#r>Qc)Uo&ojR zy>C+p#VcR5$G*3U-FC6-9sG2*ey~bVm@4?C-WwPPr(t|gG3=fE_e)Q#Vf52$N$oi) zCp(eppo{0nLGpKf#P3WBkDae0FQ=$aZ1ib%4U8EUTw|6Ylb!?Tu+U%u-~hSA6uhHE iiif!!L|UmfgK|`@hoVhCtki27?$+K0O&P3w5cvm$A7R%3 literal 0 HcmV?d00001 diff --git a/src/grid.o b/src/grid.o new file mode 100644 index 0000000000000000000000000000000000000000..41aa031479812ca7d042e3ff5a905d056649983e GIT binary patch literal 4504 zcmb7IZ){sv6~AuNH7jXe7#(9kmBwKEuLi=G%z!x?&iGJ*deTbkcPFvMsiddu!VQKkbu_A2AAS0~J-Lh`KbMJZn zS63BRdGB}6pL@=^=bn4-bKd><-*@&4;n^$j!qbK4#2&o7c+eijlPAGFTH$~eBxnqp zOT(t1XCE=qYOXjP4>byz9&+_XJZ&ij=l(5V$$wgl zWv|RsWx65*W$7l+?}+XsL~5^5&S8Z?lh)9*m))s*h22T_??B zs`W8lG(}{g2CP|&H@v5>PfkuAHXd7oAt5N=GP5hwwS`QrIi6bcglpP1rPwid_mN1N zyQLohF|2vswdQ%(^t`D?XqaA?-4aNmPhU44YxPe8cW$lzb;4c$t|9i{oDv-=r=-ol z8+N;Y)Z3AP?1)^qWTqz5RT-#Ae|Z!od3kN&n(`OOAFrab;@>t_b@eDUo(gi0_Ma7OfW?2ProE#WSlni(y^QBeff)l#K>#|dN0Zg^*i#Lv_yW-Di#WxHs&pX5C2R$(8@~}O@TN(6}4z(&P!Obp@&GRer{EDTEjY*f8SuTw= zCXE_zu5ZkD9P_PMGF_B`Thd>^+U_`+9Tm7V^G@cLN_Kt>*_N3#EVvB3Ez_5^!n%`L zbJCZcz}tHA(%iCmDS}u8WO~b)>sFBHVVj#s&z5sky?@@t%ni%Qpr&p)fr4u(n=`La zs*sQ?kRnF&l9oA{OV-hxvG}*T)L${K9`h)vcCQQPEv>ML9K%5%OZhae4tf^u*pL`Y zKe>loyVORH-Z7Twct;3X1gL!E%w2Fq={NLJy>H;{jyivc7LlE%$?0EL4tbo+rjyRA z;nLi6G8+wQ!!fV$V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xufQ3ARu6!^;C8SN90JdPJHd0{ z4lunp1>6hn25aCe;OF3r;7{OlV0t8%KqtX%;2AI-)>Awn+N*0%oDS4C+MICH4*wIc z74eGkZdNuXl}VoJ?X$>gz&O2x**`c%n9#>2YNUJR?Yp;$d6Y->)U7#rVx52TJkUf* z^*@kH{8{h<7$y0q!6?Z;4u+*QG_ErwqTPtvFpWBi7yxmiQ1 hrcsu|_yMW6bTtu)smV=3jj=>bi-m_`Ni|A)`wO&j{yYEx literal 0 HcmV?d00001 diff --git a/src/wordsearch b/src/wordsearch new file mode 100755 index 0000000000000000000000000000000000000000..779b5996aa611f0175268b0a364b16205f9e9519 GIT binary patch literal 13716 zcmeHOdu&_P89z5oA#{P8vNE~{t3hP6JlX~Vqomam)(aPCptSWUMd8+QoW{b5gCDe= zWGPvjDYuufY+_7kj4=(NYA3-&fkF)C<@q7Nf!>Su86N+LKTOK)Jlk zGB|_&=w%)c>FNb`5`D#_WyKT8_IRPIT;9&Fdh*sQjy#>8P^086*hhI*S18gOih-$I z-U~`z-UZT(d!d|XUof7Cg?n}>hH`mzD?IzQt8voBr9?IcEGyZwJKWP@g?l=qk}h43 zE+vm^&O*9ehBxB1mKEx%fdd{*s`sqh|TBuDK{v)LCeAo zi^6?ExeM#CE1Hin$1Ur^@@hE9;w!a_a+a`P70c?0Sn<8x?a_$Un~0q!ug2%ur_2$g zi~Xd$&na01mK6znn!M#cPu^xVhjg(#`g^$=Be1Msv?spcak;;}K2IKiETl`$h3d}( z%jyUu0(t8E_zh#ehT)82A^qv{+T#nS?0k8B*Lw1bWfbo_>MAbWC*HlZ>AnXaFgD(| zO^vSgswqEE7*;a;c#R8z<oqfSwa-MeIoxG_(&4`n6%<-EyjBw1*v=T20Pd2#em3MFVo=7U8U$6#E0c3RF0FT>`JLbpb~*f1S%1z zM4%FZN(3qqs6?O=fl34_5vWAqvxtD-v_CNS&DPnex&G7~HR}7uQ1!Zz6Z$bDR|w!j z{IYfurq9}~uG8u^wPyA2ae*Ae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-nwKUckx(KLiqV%RlcAnqI20E@tHL*Ye7!I5i5E4c!{ZhQwf1PT zrz0+YjsLF5tU@MW=0-HbH=}t8iSVlEQz1+INehV6nyA_%-q7}nx4=5QmRt>BctTlo z29}B+RiXD*4D~f)i1{c>W|{`87&y=DAAl!wJ9uW+p&7jk&14gr;TAL_%s*sS^^R!6 zTBfQ`>(es)TeOq;qqFbVGR?v?5~zhjC$GQ{ZTa`JnWfaVI>|srm??B5VTOI)L?)t{ zJDEX}i{s3ZkbVhCPtweNkY>({bWqWCYWyih3;fK+@qW^fKjQOf=5sio?=N%w$BM4Q z3*n?+$%Eg6S0-=`goHL2a_vrbH=2BF?Q;yR7 zzs~Uqc}xqZYBkSOI1mZPLml{sg!7N0RX8khAuk4R*IGQG>a0k-z$PSFdaUrDEBRAv zUEo~eR>5IGn?F2OH_zD~bP?_qmdxdPXUDsAloh2nM9Fn1FSn8&?}GGhI`57v+-~`M XEq|kVcbU4y^7of_bDej$$_4l@`|8l6 literal 0 HcmV?d00001 diff --git a/uk/org/mafoo/wordsearch/GridFactory.java b/uk/org/mafoo/wordsearch/GridFactory.java index 280f099..5b65f2a 100755 --- a/uk/org/mafoo/wordsearch/GridFactory.java +++ b/uk/org/mafoo/wordsearch/GridFactory.java @@ -161,7 +161,7 @@ public class GridFactory { public static char[][] makeGrid(List words, int height, int width, Modes mode) { char[][] grid = new char[height][width]; - bool simple = (mode == Modes.SIMPLE || mode == Modes.CROSSWORD); + boolean simple = (mode == Modes.SIMPLE || mode == Modes.CROSSWORD); // Place words at random? for (String word : words) { diff --git a/uk/org/mafoo/wordsearch/Modes.java b/uk/org/mafoo/wordsearch/Modes.java index 13cdeb4..65e2b49 100644 --- a/uk/org/mafoo/wordsearch/Modes.java +++ b/uk/org/mafoo/wordsearch/Modes.java @@ -3,5 +3,5 @@ package uk.org.mafoo.wordsearch; enum Modes { NORMAL, SIMPLE, - CROSSWORD, + CROSSWORD; } \ No newline at end of file diff --git a/uk/org/mafoo/wordsearch/Store.java b/uk/org/mafoo/wordsearch/Store.java new file mode 100644 index 0000000..41fde25 --- /dev/null +++ b/uk/org/mafoo/wordsearch/Store.java @@ -0,0 +1,22 @@ +package uk.org.mafoo.wordsearch; + +import java.sql.*; + + +class Store { + + Connection conn = null; + + protected Store(String dbfile) { + try { + Class.forName("org.sqlite.JDBC"); + conn = DriverManager.getConnection("jdbc:sqlite:" + dbfile); + } catch ( Exception e ) { + System.err.println( e.getClass().getName() + ": " + e.getMessage() ); + System.exit(1); + } + } + + protected storeInstance() + +} \ No newline at end of file