Browse Source

Uncommitted changes


git-svn-id: http://chris.smith.name/svn/japoker/trunk@11 b8598caf-53df-4c1b-98b8-507a84a220
tags/v12
Chris Smith 14 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,6 +2,11 @@
2 2
 <!-- You may freely edit this file. See commented blocks below for -->
3 3
 <!-- some examples of how to customize the build. -->
4 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 10
 <project name="CardGame" default="default" basedir=".">
6 11
     <description>Builds, tests, and runs the project CardGame.</description>
7 12
     <import file="nbproject/build-impl.xml"/>

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

@@ -19,7 +19,14 @@ is divided into following sections:
19 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 30
     <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
24 31
     <!-- 
25 32
                 ======================
@@ -152,10 +159,18 @@ is divided into following sections:
152 159
             <attribute default="${includes}" name="includes"/>
153 160
             <attribute default="${excludes}" name="excludes"/>
154 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 164
             <element name="customize" optional="true"/>
157 165
             <sequential>
166
+                <property location="${build.dir}/empty" name="empty.dir"/>
167
+                <mkdir dir="${empty.dir}"/>
158 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 174
                     <classpath>
160 175
                         <path path="@{classpath}"/>
161 176
                     </classpath>
@@ -218,13 +233,13 @@ is divided into following sections:
218 233
             </sequential>
219 234
         </macrodef>
220 235
     </target>
221
-    <target name="-init-macrodef-nbjpda">
236
+    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
222 237
         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
223 238
             <attribute default="${main.class}" name="name"/>
224 239
             <attribute default="${debug.classpath}" name="classpath"/>
225 240
             <attribute default="" name="stopclassname"/>
226 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 243
                     <classpath>
229 244
                         <path path="@{classpath}"/>
230 245
                     </classpath>
@@ -235,7 +250,9 @@ is divided into following sections:
235 250
             <attribute default="${build.classes.dir}" name="dir"/>
236 251
             <sequential>
237 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 256
                 </nbjpdareload>
240 257
             </sequential>
241 258
         </macrodef>
@@ -253,6 +270,12 @@ is divided into following sections:
253 270
         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
254 271
             <istrue value="${have-jdk-older-than-1.4}"/>
255 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 279
     </target>
257 280
     <target depends="-init-debug-args" name="-init-macrodef-debug">
258 281
         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
@@ -262,7 +285,9 @@ is divided into following sections:
262 285
             <sequential>
263 286
                 <java classname="@{classname}" dir="${work.dir}" fork="true">
264 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 291
                     <jvmarg line="${run.jvmargs}"/>
267 292
                     <classpath>
268 293
                         <path path="@{classpath}"/>
@@ -279,12 +304,15 @@ is divided into following sections:
279 304
     <target name="-init-macrodef-java">
280 305
         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
281 306
             <attribute default="${main.class}" name="classname"/>
307
+            <attribute default="${run.classpath}" name="classpath"/>
282 308
             <element name="customize" optional="true"/>
283 309
             <sequential>
284 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 313
                     <jvmarg line="${run.jvmargs}"/>
286 314
                     <classpath>
287
-                        <path path="${run.classpath}"/>
315
+                        <path path="@{classpath}"/>
288 316
                     </classpath>
289 317
                     <syspropertyset>
290 318
                         <propertyref prefix="run-sys-prop."/>
@@ -309,6 +337,13 @@ is divided into following sections:
309 337
                 ===================
310 338
             -->
311 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 347
     <target depends="init,deps-jar" name="-pre-pre-compile">
313 348
         <mkdir dir="${build.classes.dir}"/>
314 349
     </target>
@@ -317,10 +352,15 @@ is divided into following sections:
317 352
         <!-- You can override this target in the ../build.xml file. -->
318 353
     </target>
319 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 361
     </target>
322 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 364
         <copy todir="${build.classes.dir}">
325 365
             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
326 366
         </copy>
@@ -329,7 +369,7 @@ is divided into following sections:
329 369
         <!-- Empty placeholder for easier customization. -->
330 370
         <!-- You can override this target in the ../build.xml file. -->
331 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 373
     <target name="-pre-compile-single">
334 374
         <!-- Empty placeholder for easier customization. -->
335 375
         <!-- You can override this target in the ../build.xml file. -->
@@ -337,13 +377,13 @@ is divided into following sections:
337 377
     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
338 378
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
339 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 381
     </target>
342 382
     <target name="-post-compile-single">
343 383
         <!-- Empty placeholder for easier customization. -->
344 384
         <!-- You can override this target in the ../build.xml file. -->
345 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 389
                 JAR BUILDING SECTION
@@ -403,11 +443,29 @@ is divided into following sections:
403 443
         <property location="${dist.jar}" name="dist.jar.resolved"/>
404 444
         <echo>java -jar "${dist.jar.resolved}"</echo>
405 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 464
     <target name="-post-jar">
407 465
         <!-- Empty placeholder for easier customization. -->
408 466
         <!-- You can override this target in the ../build.xml file. -->
409 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 471
                 EXECUTION SECTION
@@ -427,6 +485,10 @@ is divided into following sections:
427 485
         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
428 486
         <j2seproject1:java classname="${run.class}"/>
429 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 494
                 DEBUGGING SECTION
@@ -435,6 +497,9 @@ is divided into following sections:
435 497
     <target depends="init" if="netbeans.home" name="-debug-start-debugger">
436 498
         <j2seproject1:nbjpdastart name="${debug.class}"/>
437 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 503
     <target depends="init,compile" name="-debug-start-debuggee">
439 504
         <j2seproject3:debug>
440 505
             <customize>
@@ -452,6 +517,11 @@ is divided into following sections:
452 517
         <j2seproject3:debug classname="${debug.class}"/>
453 518
     </target>
454 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 525
     <target depends="init" name="-pre-debug-fix">
456 526
         <fail unless="fix.includes">Must set fix.includes</fail>
457 527
         <property name="javac.includes" value="${fix.includes}.java"/>
@@ -474,6 +544,9 @@ is divided into following sections:
474 544
             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
475 545
                 <filename name="**/*.java"/>
476 546
             </fileset>
547
+            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
548
+                <include name="**/*.java"/>
549
+            </fileset>
477 550
         </javadoc>
478 551
     </target>
479 552
     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
@@ -535,7 +608,7 @@ is divided into following sections:
535 608
         <j2seproject3:junit testincludes="**/*Test.java"/>
536 609
     </target>
537 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 612
     </target>
540 613
     <target depends="init" if="have.tests" name="test-report"/>
541 614
     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
@@ -548,7 +621,7 @@ is divided into following sections:
548 621
         <j2seproject3:junit excludes="" includes="${test.includes}"/>
549 622
     </target>
550 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 625
     </target>
553 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,8 +1,8 @@
1 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 4
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 5
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 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,4 +1,4 @@
1 1
 javac.debug=true
2 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,6 +5,7 @@ build.classes.excludes=**/*.java,**/*.form
5 5
 # This directory is removed when the project is cleaned:
6 6
 build.dir=build
7 7
 build.generated.dir=${build.dir}/generated
8
+build.generated.sources.dir=${build.dir}/generated-sources
8 9
 # Only compile against the classpath explicitly listed here:
9 10
 build.sysclasspath=ignore
10 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,6 +106,32 @@ public class StandardHandTest {
106 106
         h.getDeck().removeAll(b);
107 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 136
     @Test
111 137
     public void checkNoPair() {

Loading…
Cancel
Save