Browse Source

Uncommitted changes


git-svn-id: http://chris.smith.name/svn/japoker/trunk@11 b8598caf-53df-4c1b-98b8-507a84a220
tags/v12
Chris Smith 15 years ago
parent
commit
e17976a1bb
66 changed files with 126 additions and 21 deletions
  1. 5
    0
      build.xml
  2. 88
    15
      nbproject/build-impl.xml
  3. 4
    4
      nbproject/genfiles.properties
  4. 2
    2
      nbproject/private/private.properties
  5. 1
    0
      nbproject/project.properties
  6. BIN
      src/com/md87/cardgame/res/back1.png
  7. BIN
      src/com/md87/cardgame/res/back2.png
  8. BIN
      src/com/md87/cardgame/res/cace.png
  9. BIN
      src/com/md87/cardgame/res/cdeuce.png
  10. BIN
      src/com/md87/cardgame/res/ceight.png
  11. BIN
      src/com/md87/cardgame/res/cfive.png
  12. BIN
      src/com/md87/cardgame/res/cfour.png
  13. BIN
      src/com/md87/cardgame/res/chip.pdn
  14. BIN
      src/com/md87/cardgame/res/chip1.png
  15. BIN
      src/com/md87/cardgame/res/cjack.png
  16. BIN
      src/com/md87/cardgame/res/cking.png
  17. BIN
      src/com/md87/cardgame/res/cnine.png
  18. BIN
      src/com/md87/cardgame/res/cqueen.png
  19. BIN
      src/com/md87/cardgame/res/cseven.png
  20. BIN
      src/com/md87/cardgame/res/csix.png
  21. BIN
      src/com/md87/cardgame/res/cten.png
  22. BIN
      src/com/md87/cardgame/res/cthree.png
  23. BIN
      src/com/md87/cardgame/res/dace.png
  24. BIN
      src/com/md87/cardgame/res/ddeuce.png
  25. BIN
      src/com/md87/cardgame/res/deight.png
  26. BIN
      src/com/md87/cardgame/res/dfive.png
  27. BIN
      src/com/md87/cardgame/res/dfour.png
  28. BIN
      src/com/md87/cardgame/res/djack.png
  29. BIN
      src/com/md87/cardgame/res/dking.png
  30. BIN
      src/com/md87/cardgame/res/dnine.png
  31. BIN
      src/com/md87/cardgame/res/dqueen.png
  32. BIN
      src/com/md87/cardgame/res/dseven.png
  33. BIN
      src/com/md87/cardgame/res/dsix.png
  34. BIN
      src/com/md87/cardgame/res/dten.png
  35. BIN
      src/com/md87/cardgame/res/dthree.png
  36. BIN
      src/com/md87/cardgame/res/hace.png
  37. BIN
      src/com/md87/cardgame/res/hdeuce.png
  38. BIN
      src/com/md87/cardgame/res/height.png
  39. BIN
      src/com/md87/cardgame/res/hfive.png
  40. BIN
      src/com/md87/cardgame/res/hfour.png
  41. BIN
      src/com/md87/cardgame/res/hjack.png
  42. BIN
      src/com/md87/cardgame/res/hking.png
  43. BIN
      src/com/md87/cardgame/res/hnine.png
  44. BIN
      src/com/md87/cardgame/res/hqueen.png
  45. BIN
      src/com/md87/cardgame/res/hseven.png
  46. BIN
      src/com/md87/cardgame/res/hsix.png
  47. BIN
      src/com/md87/cardgame/res/hten.png
  48. BIN
      src/com/md87/cardgame/res/hthree.png
  49. BIN
      src/com/md87/cardgame/res/icon.png
  50. BIN
      src/com/md87/cardgame/res/money.png
  51. BIN
      src/com/md87/cardgame/res/sace.png
  52. BIN
      src/com/md87/cardgame/res/save.png
  53. BIN
      src/com/md87/cardgame/res/sdeuce.png
  54. BIN
      src/com/md87/cardgame/res/seight.png
  55. BIN
      src/com/md87/cardgame/res/sfive.png
  56. BIN
      src/com/md87/cardgame/res/sfour.png
  57. BIN
      src/com/md87/cardgame/res/sjack.png
  58. BIN
      src/com/md87/cardgame/res/sking.png
  59. BIN
      src/com/md87/cardgame/res/snine.png
  60. BIN
      src/com/md87/cardgame/res/squeen.png
  61. BIN
      src/com/md87/cardgame/res/sseven.png
  62. BIN
      src/com/md87/cardgame/res/ssix.png
  63. BIN
      src/com/md87/cardgame/res/sten.png
  64. BIN
      src/com/md87/cardgame/res/sthree.png
  65. BIN
      src/com/md87/cardgame/res/user.png
  66. 26
    0
      test/com/md87/cardgame/StandardHandTest.java

+ 5
- 0
build.xml View File

2
 <!-- You may freely edit this file. See commented blocks below for -->
2
 <!-- You may freely edit this file. See commented blocks below for -->
3
 <!-- some examples of how to customize the build. -->
3
 <!-- some examples of how to customize the build. -->
4
 <!-- (If you delete it and reopen the project it will be recreated.) -->
4
 <!-- (If you delete it and reopen the project it will be recreated.) -->
5
+<!-- By default, only the Clean and Build commands use this build script. -->
6
+<!-- Commands such as Run, Debug, and Test only use this build script if -->
7
+<!-- the Compile on Save feature is turned off for the project. -->
8
+<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
9
+<!-- in the project's Project Properties dialog box.-->
5
 <project name="CardGame" default="default" basedir=".">
10
 <project name="CardGame" default="default" basedir=".">
6
     <description>Builds, tests, and runs the project CardGame.</description>
11
     <description>Builds, tests, and runs the project CardGame.</description>
7
     <import file="nbproject/build-impl.xml"/>
12
     <import file="nbproject/build-impl.xml"/>

+ 88
- 15
nbproject/build-impl.xml View File

19
   - cleanup
19
   - cleanup
20
 
20
 
21
         -->
21
         -->
22
-<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="CardGame-impl">
22
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="CardGame-impl">
23
+    <fail message="Please build using Ant 1.7.1 or higher.">
24
+        <condition>
25
+            <not>
26
+                <antversion atleast="1.7.1"/>
27
+            </not>
28
+        </condition>
29
+    </fail>
23
     <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
30
     <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
24
     <!-- 
31
     <!-- 
25
                 ======================
32
                 ======================
152
             <attribute default="${includes}" name="includes"/>
159
             <attribute default="${includes}" name="includes"/>
153
             <attribute default="${excludes}" name="excludes"/>
160
             <attribute default="${excludes}" name="excludes"/>
154
             <attribute default="${javac.debug}" name="debug"/>
161
             <attribute default="${javac.debug}" name="debug"/>
155
-            <attribute default="" name="sourcepath"/>
162
+            <attribute default="${empty.dir}" name="sourcepath"/>
163
+            <attribute default="${empty.dir}" name="gensrcdir"/>
156
             <element name="customize" optional="true"/>
164
             <element name="customize" optional="true"/>
157
             <sequential>
165
             <sequential>
166
+                <property location="${build.dir}/empty" name="empty.dir"/>
167
+                <mkdir dir="${empty.dir}"/>
158
                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
168
                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
169
+                    <src>
170
+                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
171
+                            <include name="*"/>
172
+                        </dirset>
173
+                    </src>
159
                     <classpath>
174
                     <classpath>
160
                         <path path="@{classpath}"/>
175
                         <path path="@{classpath}"/>
161
                     </classpath>
176
                     </classpath>
218
             </sequential>
233
             </sequential>
219
         </macrodef>
234
         </macrodef>
220
     </target>
235
     </target>
221
-    <target name="-init-macrodef-nbjpda">
236
+    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
222
         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
237
         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
223
             <attribute default="${main.class}" name="name"/>
238
             <attribute default="${main.class}" name="name"/>
224
             <attribute default="${debug.classpath}" name="classpath"/>
239
             <attribute default="${debug.classpath}" name="classpath"/>
225
             <attribute default="" name="stopclassname"/>
240
             <attribute default="" name="stopclassname"/>
226
             <sequential>
241
             <sequential>
227
-                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
242
+                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
228
                     <classpath>
243
                     <classpath>
229
                         <path path="@{classpath}"/>
244
                         <path path="@{classpath}"/>
230
                     </classpath>
245
                     </classpath>
235
             <attribute default="${build.classes.dir}" name="dir"/>
250
             <attribute default="${build.classes.dir}" name="dir"/>
236
             <sequential>
251
             <sequential>
237
                 <nbjpdareload>
252
                 <nbjpdareload>
238
-                    <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
253
+                    <fileset dir="@{dir}" includes="${fix.classes}">
254
+                        <include name="${fix.includes}*.class"/>
255
+                    </fileset>
239
                 </nbjpdareload>
256
                 </nbjpdareload>
240
             </sequential>
257
             </sequential>
241
         </macrodef>
258
         </macrodef>
253
         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
270
         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
254
             <istrue value="${have-jdk-older-than-1.4}"/>
271
             <istrue value="${have-jdk-older-than-1.4}"/>
255
         </condition>
272
         </condition>
273
+        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
274
+            <os family="windows"/>
275
+        </condition>
276
+        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
277
+            <isset property="debug.transport"/>
278
+        </condition>
256
     </target>
279
     </target>
257
     <target depends="-init-debug-args" name="-init-macrodef-debug">
280
     <target depends="-init-debug-args" name="-init-macrodef-debug">
258
         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
281
         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
262
             <sequential>
285
             <sequential>
263
                 <java classname="@{classname}" dir="${work.dir}" fork="true">
286
                 <java classname="@{classname}" dir="${work.dir}" fork="true">
264
                     <jvmarg line="${debug-args-line}"/>
287
                     <jvmarg line="${debug-args-line}"/>
265
-                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
288
+                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
289
+                    <jvmarg value="-Dfile.encoding=${source.encoding}"/>
290
+                    <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
266
                     <jvmarg line="${run.jvmargs}"/>
291
                     <jvmarg line="${run.jvmargs}"/>
267
                     <classpath>
292
                     <classpath>
268
                         <path path="@{classpath}"/>
293
                         <path path="@{classpath}"/>
279
     <target name="-init-macrodef-java">
304
     <target name="-init-macrodef-java">
280
         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
305
         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
281
             <attribute default="${main.class}" name="classname"/>
306
             <attribute default="${main.class}" name="classname"/>
307
+            <attribute default="${run.classpath}" name="classpath"/>
282
             <element name="customize" optional="true"/>
308
             <element name="customize" optional="true"/>
283
             <sequential>
309
             <sequential>
284
                 <java classname="@{classname}" dir="${work.dir}" fork="true">
310
                 <java classname="@{classname}" dir="${work.dir}" fork="true">
311
+                    <jvmarg value="-Dfile.encoding=${source.encoding}"/>
312
+                    <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
285
                     <jvmarg line="${run.jvmargs}"/>
313
                     <jvmarg line="${run.jvmargs}"/>
286
                     <classpath>
314
                     <classpath>
287
-                        <path path="${run.classpath}"/>
315
+                        <path path="@{classpath}"/>
288
                     </classpath>
316
                     </classpath>
289
                     <syspropertyset>
317
                     <syspropertyset>
290
                         <propertyref prefix="run-sys-prop."/>
318
                         <propertyref prefix="run-sys-prop."/>
309
                 ===================
337
                 ===================
310
             -->
338
             -->
311
     <target depends="init" name="deps-jar" unless="no.deps"/>
339
     <target depends="init" name="deps-jar" unless="no.deps"/>
340
+    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
341
+    <target depends="init" name="-check-automatic-build">
342
+        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
343
+    </target>
344
+    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
345
+        <antcall target="clean"/>
346
+    </target>
312
     <target depends="init,deps-jar" name="-pre-pre-compile">
347
     <target depends="init,deps-jar" name="-pre-pre-compile">
313
         <mkdir dir="${build.classes.dir}"/>
348
         <mkdir dir="${build.classes.dir}"/>
314
     </target>
349
     </target>
317
         <!-- You can override this target in the ../build.xml file. -->
352
         <!-- You can override this target in the ../build.xml file. -->
318
     </target>
353
     </target>
319
     <target if="do.depend.true" name="-compile-depend">
354
     <target if="do.depend.true" name="-compile-depend">
320
-        <j2seproject3:depend/>
355
+        <pathconvert property="build.generated.subdirs">
356
+            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
357
+                <include name="*"/>
358
+            </dirset>
359
+        </pathconvert>
360
+        <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
321
     </target>
361
     </target>
322
     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
362
     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
323
-        <j2seproject3:javac/>
363
+        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
324
         <copy todir="${build.classes.dir}">
364
         <copy todir="${build.classes.dir}">
325
             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
365
             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
326
         </copy>
366
         </copy>
329
         <!-- Empty placeholder for easier customization. -->
369
         <!-- Empty placeholder for easier customization. -->
330
         <!-- You can override this target in the ../build.xml file. -->
370
         <!-- You can override this target in the ../build.xml file. -->
331
     </target>
371
     </target>
332
-    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
372
+    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
333
     <target name="-pre-compile-single">
373
     <target name="-pre-compile-single">
334
         <!-- Empty placeholder for easier customization. -->
374
         <!-- Empty placeholder for easier customization. -->
335
         <!-- You can override this target in the ../build.xml file. -->
375
         <!-- You can override this target in the ../build.xml file. -->
337
     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
377
     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
338
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
378
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
339
         <j2seproject3:force-recompile/>
379
         <j2seproject3:force-recompile/>
340
-        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
380
+        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
341
     </target>
381
     </target>
342
     <target name="-post-compile-single">
382
     <target name="-post-compile-single">
343
         <!-- Empty placeholder for easier customization. -->
383
         <!-- Empty placeholder for easier customization. -->
344
         <!-- You can override this target in the ../build.xml file. -->
384
         <!-- You can override this target in the ../build.xml file. -->
345
     </target>
385
     </target>
346
-    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
386
+    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
347
     <!--
387
     <!--
348
                 ====================
388
                 ====================
349
                 JAR BUILDING SECTION
389
                 JAR BUILDING SECTION
403
         <property location="${dist.jar}" name="dist.jar.resolved"/>
443
         <property location="${dist.jar}" name="dist.jar.resolved"/>
404
         <echo>java -jar "${dist.jar.resolved}"</echo>
444
         <echo>java -jar "${dist.jar.resolved}"</echo>
405
     </target>
445
     </target>
446
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="libs.CopyLibs.classpath" name="-do-jar-with-libraries-without-manifest" unless="manifest.available+main.class">
447
+        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
448
+        <pathconvert property="run.classpath.without.build.classes.dir">
449
+            <path path="${run.classpath}"/>
450
+            <map from="${build.classes.dir.resolved}" to=""/>
451
+        </pathconvert>
452
+        <pathconvert pathsep=" " property="jar.classpath">
453
+            <path path="${run.classpath.without.build.classes.dir}"/>
454
+            <chainedmapper>
455
+                <flattenmapper/>
456
+                <globmapper from="*" to="lib/*"/>
457
+            </chainedmapper>
458
+        </pathconvert>
459
+        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
460
+        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
461
+            <fileset dir="${build.classes.dir}"/>
462
+        </copylibs>
463
+    </target>
406
     <target name="-post-jar">
464
     <target name="-post-jar">
407
         <!-- Empty placeholder for easier customization. -->
465
         <!-- Empty placeholder for easier customization. -->
408
         <!-- You can override this target in the ../build.xml file. -->
466
         <!-- You can override this target in the ../build.xml file. -->
409
     </target>
467
     </target>
410
-    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
468
+    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
411
     <!--
469
     <!--
412
                 =================
470
                 =================
413
                 EXECUTION SECTION
471
                 EXECUTION SECTION
427
         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
485
         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
428
         <j2seproject1:java classname="${run.class}"/>
486
         <j2seproject1:java classname="${run.class}"/>
429
     </target>
487
     </target>
488
+    <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
489
+        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
490
+        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
491
+    </target>
430
     <!--
492
     <!--
431
                 =================
493
                 =================
432
                 DEBUGGING SECTION
494
                 DEBUGGING SECTION
435
     <target depends="init" if="netbeans.home" name="-debug-start-debugger">
497
     <target depends="init" if="netbeans.home" name="-debug-start-debugger">
436
         <j2seproject1:nbjpdastart name="${debug.class}"/>
498
         <j2seproject1:nbjpdastart name="${debug.class}"/>
437
     </target>
499
     </target>
500
+    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
501
+        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
502
+    </target>
438
     <target depends="init,compile" name="-debug-start-debuggee">
503
     <target depends="init,compile" name="-debug-start-debuggee">
439
         <j2seproject3:debug>
504
         <j2seproject3:debug>
440
             <customize>
505
             <customize>
452
         <j2seproject3:debug classname="${debug.class}"/>
517
         <j2seproject3:debug classname="${debug.class}"/>
453
     </target>
518
     </target>
454
     <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
519
     <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
520
+    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
521
+        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
522
+        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
523
+    </target>
524
+    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
455
     <target depends="init" name="-pre-debug-fix">
525
     <target depends="init" name="-pre-debug-fix">
456
         <fail unless="fix.includes">Must set fix.includes</fail>
526
         <fail unless="fix.includes">Must set fix.includes</fail>
457
         <property name="javac.includes" value="${fix.includes}.java"/>
527
         <property name="javac.includes" value="${fix.includes}.java"/>
474
             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
544
             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
475
                 <filename name="**/*.java"/>
545
                 <filename name="**/*.java"/>
476
             </fileset>
546
             </fileset>
547
+            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
548
+                <include name="**/*.java"/>
549
+            </fileset>
477
         </javadoc>
550
         </javadoc>
478
     </target>
551
     </target>
479
     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
552
     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
535
         <j2seproject3:junit testincludes="**/*Test.java"/>
608
         <j2seproject3:junit testincludes="**/*Test.java"/>
536
     </target>
609
     </target>
537
     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
610
     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
538
-        <fail if="tests.failed">Some tests failed; see details above.</fail>
611
+        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
539
     </target>
612
     </target>
540
     <target depends="init" if="have.tests" name="test-report"/>
613
     <target depends="init" if="have.tests" name="test-report"/>
541
     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
614
     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
548
         <j2seproject3:junit excludes="" includes="${test.includes}"/>
621
         <j2seproject3:junit excludes="" includes="${test.includes}"/>
549
     </target>
622
     </target>
550
     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
623
     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
551
-        <fail if="tests.failed">Some tests failed; see details above.</fail>
624
+        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
552
     </target>
625
     </target>
553
     <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
626
     <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
554
     <!--
627
     <!--

+ 4
- 4
nbproject/genfiles.properties View File

1
 build.xml.data.CRC32=f0848ad5
1
 build.xml.data.CRC32=f0848ad5
2
-build.xml.script.CRC32=e8f6e476
3
-build.xml.stylesheet.CRC32=be360661
2
+build.xml.script.CRC32=f607881a
3
+build.xml.stylesheet.CRC32=958a1d3e
4
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
4
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
5
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6
 nbproject/build-impl.xml.data.CRC32=f0848ad5
6
 nbproject/build-impl.xml.data.CRC32=f0848ad5
7
-nbproject/build-impl.xml.script.CRC32=8ae13691
8
-nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
7
+nbproject/build-impl.xml.script.CRC32=8ef63e62
8
+nbproject/build-impl.xml.stylesheet.CRC32=5c621a33@1.26.1.45

+ 2
- 2
nbproject/private/private.properties View File

1
 javac.debug=true
1
 javac.debug=true
2
 javadoc.preview=true
2
 javadoc.preview=true
3
-jaxws.endorsed.dir=/usr/local/netbeans-6.1/java2/modules/ext/jaxws21/api
4
-user.properties.file=/home/chris/.netbeans/6.1/build.properties
3
+jaxws.endorsed.dir=/usr/local/netbeans-6.7/java2/modules/ext/jaxws21/api:/usr/local/netbeans-6.7/ide11/modules/ext/jaxb/api
4
+user.properties.file=/home/chris/.netbeans/6.7/build.properties

+ 1
- 0
nbproject/project.properties View File

5
 # This directory is removed when the project is cleaned:
5
 # This directory is removed when the project is cleaned:
6
 build.dir=build
6
 build.dir=build
7
 build.generated.dir=${build.dir}/generated
7
 build.generated.dir=${build.dir}/generated
8
+build.generated.sources.dir=${build.dir}/generated-sources
8
 # Only compile against the classpath explicitly listed here:
9
 # Only compile against the classpath explicitly listed here:
9
 build.sysclasspath=ignore
10
 build.sysclasspath=ignore
10
 build.test.classes.dir=${build.dir}/test/classes
11
 build.test.classes.dir=${build.dir}/test/classes

BIN
src/com/md87/cardgame/res/back1.png View File


BIN
src/com/md87/cardgame/res/back2.png View File


BIN
src/com/md87/cardgame/res/cace.png View File


BIN
src/com/md87/cardgame/res/cdeuce.png View File


BIN
src/com/md87/cardgame/res/ceight.png View File


BIN
src/com/md87/cardgame/res/cfive.png View File


BIN
src/com/md87/cardgame/res/cfour.png View File


BIN
src/com/md87/cardgame/res/chip.pdn View File


BIN
src/com/md87/cardgame/res/chip1.png View File


BIN
src/com/md87/cardgame/res/cjack.png View File


BIN
src/com/md87/cardgame/res/cking.png View File


BIN
src/com/md87/cardgame/res/cnine.png View File


BIN
src/com/md87/cardgame/res/cqueen.png View File


BIN
src/com/md87/cardgame/res/cseven.png View File


BIN
src/com/md87/cardgame/res/csix.png View File


BIN
src/com/md87/cardgame/res/cten.png View File


BIN
src/com/md87/cardgame/res/cthree.png View File


BIN
src/com/md87/cardgame/res/dace.png View File


BIN
src/com/md87/cardgame/res/ddeuce.png View File


BIN
src/com/md87/cardgame/res/deight.png View File


BIN
src/com/md87/cardgame/res/dfive.png View File


BIN
src/com/md87/cardgame/res/dfour.png View File


BIN
src/com/md87/cardgame/res/djack.png View File


BIN
src/com/md87/cardgame/res/dking.png View File


BIN
src/com/md87/cardgame/res/dnine.png View File


BIN
src/com/md87/cardgame/res/dqueen.png View File


BIN
src/com/md87/cardgame/res/dseven.png View File


BIN
src/com/md87/cardgame/res/dsix.png View File


BIN
src/com/md87/cardgame/res/dten.png View File


BIN
src/com/md87/cardgame/res/dthree.png View File


BIN
src/com/md87/cardgame/res/hace.png View File


BIN
src/com/md87/cardgame/res/hdeuce.png View File


BIN
src/com/md87/cardgame/res/height.png View File


BIN
src/com/md87/cardgame/res/hfive.png View File


BIN
src/com/md87/cardgame/res/hfour.png View File


BIN
src/com/md87/cardgame/res/hjack.png View File


BIN
src/com/md87/cardgame/res/hking.png View File


BIN
src/com/md87/cardgame/res/hnine.png View File


BIN
src/com/md87/cardgame/res/hqueen.png View File


BIN
src/com/md87/cardgame/res/hseven.png View File


BIN
src/com/md87/cardgame/res/hsix.png View File


BIN
src/com/md87/cardgame/res/hten.png View File


BIN
src/com/md87/cardgame/res/hthree.png View File


BIN
src/com/md87/cardgame/res/icon.png View File


BIN
src/com/md87/cardgame/res/money.png View File


BIN
src/com/md87/cardgame/res/sace.png View File


BIN
src/com/md87/cardgame/res/save.png View File


BIN
src/com/md87/cardgame/res/sdeuce.png View File


BIN
src/com/md87/cardgame/res/seight.png View File


BIN
src/com/md87/cardgame/res/sfive.png View File


BIN
src/com/md87/cardgame/res/sfour.png View File


BIN
src/com/md87/cardgame/res/sjack.png View File


BIN
src/com/md87/cardgame/res/sking.png View File


BIN
src/com/md87/cardgame/res/snine.png View File


BIN
src/com/md87/cardgame/res/squeen.png View File


BIN
src/com/md87/cardgame/res/sseven.png View File


BIN
src/com/md87/cardgame/res/ssix.png View File


BIN
src/com/md87/cardgame/res/sten.png View File


BIN
src/com/md87/cardgame/res/sthree.png View File


BIN
src/com/md87/cardgame/res/user.png View File


+ 26
- 0
test/com/md87/cardgame/StandardHandTest.java View File

106
         h.getDeck().removeAll(b);
106
         h.getDeck().removeAll(b);
107
         assertTrue("deck is correct", h.getDeck().isEmpty());
107
         assertTrue("deck is correct", h.getDeck().isEmpty());
108
     }
108
     }
109
+
110
+    @Test
111
+    public void checkFlushes2() {
112
+        Deck a = new Deck();
113
+        a.add(new Card(Suit.SPADES, Rank.SIX));
114
+        a.add(new Card(Suit.SPADES, Rank.THREE));
115
+        a.add(new Card(Suit.SPADES, Rank.FOUR));
116
+        a.add(new Card(Suit.SPADES, Rank.JACK));
117
+        a.add(new Card(Suit.HEARTS, Rank.QUEEN));
118
+        a.add(new Card(Suit.SPADES, Rank.QUEEN));
119
+        a.add(new Card(Suit.CLUBS, Rank.THREE));
120
+
121
+        Deck b = new Deck();
122
+        b.add(new Card(Suit.SPADES, Rank.KING));
123
+        b.add(new Card(Suit.SPADES, Rank.DEUCE));
124
+        b.add(new Card(Suit.SPADES, Rank.FOUR));
125
+        b.add(new Card(Suit.SPADES, Rank.JACK));
126
+        b.add(new Card(Suit.HEARTS, Rank.QUEEN));
127
+        b.add(new Card(Suit.SPADES, Rank.QUEEN));
128
+        b.add(new Card(Suit.CLUBS, Rank.THREE));
129
+
130
+        StandardHand ha = new StandardHand(a);
131
+        StandardHand hb = new StandardHand(b);
132
+
133
+        assertTrue("ha > hb", ha.compareTo(hb) > 0);
134
+    }
109
     
135
     
110
     @Test
136
     @Test
111
     public void checkNoPair() {
137
     public void checkNoPair() {

Loading…
Cancel
Save