Giter Site home page Giter Site logo

jcloisterzone's People

Contributors

aschoelzhorn avatar casualsmile avatar chrissy0 avatar csxm avatar decar avatar dependabot[bot] avatar djui avatar farin avatar fatsu avatar giorrrgio avatar hexmind avatar hounk avatar j0anjosep avatar jeandeaual avatar jmperez avatar joelpurra avatar joti avatar karolhor avatar khalidqasrawi avatar ljkania avatar marcotama avatar marekventur avatar mrnumbers avatar oldherl avatar sotiriskantz avatar stanolacko avatar testsr avatar texgg avatar www avatar xbukax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jcloisterzone's Issues

Fine grained Rule options

I think it would be very good if I could have even more fine grained control over which rules are enforced on each expansions. I would like to be able to play with all the tiles from certain expansions but not necessarily play with all the rules from the selected expansion.

For example: The Abbey & Mayor with no Barns
The extra tiles from King and Robber Baron but not with the rules.
Some expansions I'd like to be able to play with just the tiles.

Castle neighbouring a Castle scores incorrectly

According to the rules: "As a small city which is converted into a castle is not considered to have been
completed, it is possible for two occupied castles to be located next to each
other. In this case, when one of the castles score points, it counts as a completed
structure for the other, and both receive the same points."

In version 2.0.4 of JCloister if a neighboring castle completes (is scored) its neighbouring Castle incorrectly remains incomplete.

'Beep alert' doesn't beep

The 'beep alert on player turn' doesn't work on my PC. I include the error.log information:

ERROR Client: mark/reset not supported [AWT-EventQueue-0]
java.io.IOException: mark/reset not supported
at java.util.zip.InflaterInputStream.reset(Unknown Source)
at java.io.FilterInputStream.reset(Unknown Source)
at com.sun.media.sound.SoftMidiAudioFileReader.getAudioInputStream(Unknown Source)
at javax.sound.sampled.AudioSystem.getAudioInputStream(Unknown Source)
at com.jcloisterzone.ui.Client.beep(Client.java:452)
at com.jcloisterzone.ui.ClientController.selectTilePlacement(ClientController.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.jcloisterzone.ui.InvokeInSwingUiAdapter$1.run(InvokeInSwingUiAdapter.java:39)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Any ideas why it's failing?

Zooming bug

When the game starts, the zooming in and out with the mousewheel is not working, and remains so until either

  • a window pops up for any reason (close confirmation, controls window, highscore table, etc.)
  • the game window is minimized and reopened.

I assume there is a focus gain error at the beginning, although keyboard zooming works well, only mouse scrolling not, and any other mouse function works properly.

Can't start on Debian/GNU Linux

Hi!

Cant start 2.5 using java 6 and 2.6 using java7.

kacper@zbiig:~/bin$ java -jar JCloisterZone/JCloisterZone.jar
Exception in thread "main" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.(Window.java:535)
at java.awt.Frame.(Frame.java:420)
at java.awt.Frame.(Frame.java:385)
at javax.swing.JFrame.(JFrame.java:174)
at com.jcloisterzone.ui.Client.(Client.java:143)
at com.jcloisterzone.ui.Bootstrap.run(Bootstrap.java:92)
at com.jcloisterzone.ui.Bootstrap.main(Bootstrap.java:115)

May I help anything on debug/investigation of this problem?

2.4 works with java 6, but doesn't with java 7.

Greets!
KAcper

Board.remove(Tile) does not update Board.availMoves correctly in 2.6, affecting AI

This is my understanding of the AI:
When the AI tries different actions, it creates a SavePoint, places a tile and maybe a meeple, rates the position, and restores the simulation game to the save point.
The SavePointManager undos the tile placement.
To do so, it calls Board.remove(Tile), which removes the tile and updates availMoves.

Now here is the problem: add(Tile) updates availMoves for adjacent open positions and adds the edges of the new tile to their EdgePatterns. Which is good. However, remove() does not undo this. It only removes positions that are no longer reachable.
Thus the edge patterns get filled while trying each possible action. Therefore the AI thinks that positions that are tried later are more difficult to close, because the edge patterns have fewer wildcards than they actually should have.

I analyzed this only for the code of 2.6 (commit 453560). So if it's already solved, ignore this post ;-)

Notification sounds stop playing

First of all, thanks a lot for making this. My sister and I were able to play a game together over the internet from Windows 7 to Linux Mint 11. It was very fun and worked well: http://i.imgur.com/9WWE3.jpg

The notifications stopped playing during the game at some moment in the game that I can't recall, and I saw a bunch of these stack traces in the command line after I finished and closed the game. When I closed the game, a very loud noise played.

ERROR Client: line with format PCM_SIGNED 22050.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported. [AWT-EventQueue-0] 
javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 22050.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported.
    at com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen(DirectAudioDevice.java:494)
    at com.sun.media.sound.DirectAudioDevice$DirectClip.implOpen(DirectAudioDevice.java:1280)
    at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:107)
    at com.sun.media.sound.DirectAudioDevice$DirectClip.open(DirectAudioDevice.java:1061)
    at com.sun.media.sound.DirectAudioDevice$DirectClip.open(DirectAudioDevice.java:1151)
    at com.jcloisterzone.ui.Client.beep(Client.java:454)
    at com.jcloisterzone.ui.ClientController.selectTilePlacement(ClientController.java:246)
    at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.jcloisterzone.ui.InvokeInSwingUiAdapter$1.run(InvokeInSwingUiAdapter.java:39)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:641)
    at java.awt.EventQueue.access$000(EventQueue.java:84)
    at java.awt.EventQueue$1.run(EventQueue.java:602)
    at java.awt.EventQueue$1.run(EventQueue.java:600)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:611)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Doesn't let you place your tile

Hi, sometimes JCloister doesn't let you place your tile - you move the tile to one of the valid positions (and they're marked with a dark line) and you can't place the tile. I have definitely seen this where it gets confused about the bonus due to the builder, and I may have seen it at other times. Usually, but not always, it seems to only half believe it's your go: the triangle on the right points to your name, but the "valid position" squares are not black, but the darker grey you notice when it's not your go.

Love the game. Thank you!

Feature: Restart Game Menu Item

Could you provide an "restart game" menu item? So you dont have to enter again all the game details to restart a game when you loose

Errors while running tests

I am getting errors (Tests run: 18, Failures: 0, Errors: 4, Skipped: 0) running mvn package for the farin/master branch. Do you guys see this, or is it system dependent?


$ mvn clean
# (No problems.)
$ mvn package
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for jcloisterzone:jcloisterzone:jar:2-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 122, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building JCloisterZone 2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ jcloisterzone ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 410 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ jcloisterzone ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 363 source files to /Users/joelpurra/dev/libraries/java/JCloisterZone/target/classes
[WARNING] /Users/joelpurra/dev/libraries/java/JCloisterZone/src/main/java/com/jcloisterzone/ui/Bootstrap.java: Some input files use or override a deprecated API.
[WARNING] /Users/joelpurra/dev/libraries/java/JCloisterZone/src/main/java/com/jcloisterzone/ui/Bootstrap.java: Recompile with -Xlint:deprecation for details.
[WARNING] /Users/joelpurra/dev/libraries/java/JCloisterZone/src/main/java/com/jcloisterzone/ui/panel/CreateGamePlayerPanel.java: /Users/joelpurra/dev/libraries/java/JCloisterZone/src/main/java/com/jcloisterzone/ui/panel/CreateGamePlayerPanel.java uses unchecked or unsafe operations.
[WARNING] /Users/joelpurra/dev/libraries/java/JCloisterZone/src/main/java/com/jcloisterzone/ui/panel/CreateGamePlayerPanel.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ jcloisterzone ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ jcloisterzone ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 11 source files to /Users/joelpurra/dev/libraries/java/JCloisterZone/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ jcloisterzone ---
[INFO] Surefire report directory: /Users/joelpurra/dev/libraries/java/JCloisterZone/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.jcloisterzone.board.LocationTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.08 sec
Running com.jcloisterzone.board.TilePlacementTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.04 sec
Running com.jcloisterzone.board.TileTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.327 sec
Running com.jcloisterzone.integration.UndoableTest
Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.068 sec <<< FAILURE!
placeTileUndo(com.jcloisterzone.integration.UndoableTest)  Time elapsed: 0.038 sec  <<< ERROR!
java.lang.RuntimeException: java.lang.NullPointerException
    at com.jcloisterzone.integration.AbstractIntegrationTest.createGame(AbstractIntegrationTest.java:47)
    at com.jcloisterzone.integration.UndoableTest.placeTileUndo(UndoableTest.java:25)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.NullPointerException
    at com.jcloisterzone.game.phase.CreateGamePhase.prepareCapabilities(CreateGamePhase.java:218)
    at com.jcloisterzone.game.phase.CreateGamePhase.startGame(CreateGamePhase.java:239)
    at com.jcloisterzone.integration.AbstractIntegrationTest.createGame(AbstractIntegrationTest.java:43)
    ... 30 more

placeFolloweUndo(com.jcloisterzone.integration.UndoableTest)  Time elapsed: 0.009 sec  <<< ERROR!
java.lang.RuntimeException: java.lang.NullPointerException
    at com.jcloisterzone.integration.AbstractIntegrationTest.createGame(AbstractIntegrationTest.java:47)
    at com.jcloisterzone.integration.UndoableTest.placeFolloweUndo(UndoableTest.java:44)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.NullPointerException
    at com.jcloisterzone.game.phase.CreateGamePhase.prepareCapabilities(CreateGamePhase.java:218)
    at com.jcloisterzone.game.phase.CreateGamePhase.startGame(CreateGamePhase.java:239)
    at com.jcloisterzone.integration.AbstractIntegrationTest.createGame(AbstractIntegrationTest.java:43)
    ... 30 more

placeFolloweOnTowerUndo(com.jcloisterzone.integration.UndoableTest)  Time elapsed: 0.01 sec  <<< ERROR!
java.lang.RuntimeException: java.lang.NullPointerException
    at com.jcloisterzone.integration.AbstractIntegrationTest.createGame(AbstractIntegrationTest.java:47)
    at com.jcloisterzone.integration.UndoableTest.placeFolloweOnTowerUndo(UndoableTest.java:62)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.NullPointerException
    at com.jcloisterzone.game.phase.CreateGamePhase.prepareCapabilities(CreateGamePhase.java:218)
    at com.jcloisterzone.game.phase.CreateGamePhase.startGame(CreateGamePhase.java:239)
    at com.jcloisterzone.integration.AbstractIntegrationTest.createGame(AbstractIntegrationTest.java:43)
    ... 30 more

placeTowerPieceUndo(com.jcloisterzone.integration.UndoableTest)  Time elapsed: 0.009 sec  <<< ERROR!
java.lang.RuntimeException: java.lang.NullPointerException
    at com.jcloisterzone.integration.AbstractIntegrationTest.createGame(AbstractIntegrationTest.java:47)
    at com.jcloisterzone.integration.UndoableTest.placeTowerPieceUndo(UndoableTest.java:80)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.NullPointerException
    at com.jcloisterzone.game.phase.CreateGamePhase.prepareCapabilities(CreateGamePhase.java:218)
    at com.jcloisterzone.game.phase.CreateGamePhase.startGame(CreateGamePhase.java:239)
    at com.jcloisterzone.integration.AbstractIntegrationTest.createGame(AbstractIntegrationTest.java:43)
    ... 30 more

Running com.jcloisterzone.ui.ImmutablePointTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec

Results :

Tests in error:
  placeTileUndo(com.jcloisterzone.integration.UndoableTest): java.lang.NullPointerException
  placeFolloweUndo(com.jcloisterzone.integration.UndoableTest): java.lang.NullPointerException
  placeFolloweOnTowerUndo(com.jcloisterzone.integration.UndoableTest): java.lang.NullPointerException
  placeTowerPieceUndo(com.jcloisterzone.integration.UndoableTest): java.lang.NullPointerException

Tests run: 18, Failures: 0, Errors: 4, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.737 s
[INFO] Finished at: 2014-12-25T17:42:09+01:00
[INFO] Final Memory: 19M/352M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project jcloisterzone: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/joelpurra/dev/libraries/java/JCloisterZone/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Broken JPEG:s in theme-tile R1

First off, thanks for a great application.
I'm not sure if you want bug reports via github or e-mail, but I'll give this a try.

The JAR distributed in JCloisterZone-2.0.1.zip has a lot of broken JPEG:s for the "Rivers" expansion, which results in invisible and/or garbled tiles. I cloned your repo and issued ImageMagick's "convert" command for all JPEG:s in the R1 directory, this fixed the problems.

The F key doesn't work well if you press it AFTER the game is finished

Got another bug. This seems to be an easy one (and not very cumbersome either).

The F key doesn't work well if you press it AFTER the game is finished. Have a look at the attached screenshot (I can't save the game after it's finished). The fields is yellow's (look at the yellow noods holding the points for the field), but it's painted in red instead.

It's easy to reproduce beacuase, as far as I know, it happens EVERY time (the fields are wrongly coloured after a game is finished). I never saw this behaviour during the game, nevertheless.

Road did not complete - invalid

I've taken a screenshot of the issue (which I cant seem to attach) - it looks like a circular Road didn't complete, at the end of the game it scored 6 points, so I'm asserting that one or two squares were counted twice and the ends didn't line up.

Winter/ Inns & Cathedrals / Builders & Traders / King and Robber Baron were enabled.

Running JCloisterZone 3.0.2 (Java is 1.7.0_51)

I should have thought to save the game sorry about that.

Let me know if I can provide anything else.

I'll have a go at attaching a screenshot again in a moment.

(minor) config.ini

  1. There is a minor typo in the default config.ini file, namely:

CANNOT_PLACE_BUILDER_ON_VOLCANOR

The last "R" is redundant, removing it will actually make the option work as intented.

  1. Also, default AI names with accent/spec. chars(e.g.: áéíőúöóű) appear wrong in the game. Changing the file encoding of the config.ini file to "UTF without BOM" solves the problem. Just a heads up for foreign language users. :)

Request: AutoZoom

Could you make an autozoom feature?
so that if you place a new part, the window should zoom automatical to the correct zoom so that all parts are shown automatically?

Ai player freezes after the last dragon's movement

Since the 2.3 version the ai player is freezing after the last dragon's movement.
Two network players and one ai player.

Sometimes the dragon doesn't make the ai player freeze, but it's about 10% of times the dragon moves.

And since the saves aren't working, we cannot play the last version of the game.

AI does loop with the river and the game end

Hi,

I got a bug while playing with AI : one of them made a "loop" with one of river tile a the begining, and so the game end immediately (no more tile can be played). Seem the AI miss one rule limitation, since player can not do that.

img_24012014_095523

Play with multiple tile sets

Another feature request:

I would like to be able to select a number of expansions more than once.
For example:
I would like to be able to play with 2 sets of the basic game or 2 sets of windrose.

Taking it a set further, ideally I would like to be able to build my own sets and tile distributions for the existing database of tiles.

I might have a play building a plugin/jar builder extracting the existing elements; I'll let you know how I get on.

AI player freezes sometimes

Sometimes AI player freezes, here's an error :

[NioProcessor-6] ERROR com.jcloisterzone.game.GuiClientStub - null
java.lang.IllegalArgumentException: Mayor must be placed in city only.
at com.jcloisterzone.figure.Meeple.deploy(Meeple.java:84)
at com.jcloisterzone.figure.Follower.deployUnoccupied(Follower.java:40)
at com.jcloisterzone.game.phase.ActionPhase.deployMeeple(ActionPhase.java:170)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.jcloisterzone.rmi.CallMessage.call(CallMessage.java:62)
at com.jcloisterzone.rmi.mina.ClientStub.callMessageReceived(ClientStub.java:152)
at com.jcloisterzone.rmi.mina.ClientStub.messageReceived(ClientStub.java:114)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:407)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:236)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:410)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:710)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Error in dragon movement

Situation:
Upon playing against computers, sometimes after the dragon finishes moving and it is my turn again, the game freezes up. (I get a new tile shown, but cannot click on it, or anything. Menu items work properly.)

It might not always generate an error log, however when it does:
ERROR ClientStub: [NioProcessor-5]
java.lang.IllegalArgumentException: Invalid dragon move.
at com.jcloisterzone.game.phase.DragonMovePhase.moveDragon(DragonMovePhase.java:48)
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.jcloisterzone.rmi.CallMessage.call(CallMessage.java:62)
at com.jcloisterzone.rmi.mina.ClientStub.callMessageReceived(ClientStub.java:129)
at com.jcloisterzone.rmi.mina.ClientStub.messageReceived(ClientStub.java:98)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:427)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:245)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:715)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:668)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:657)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1141)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


p.s.: Thanks for this awesome version :)

some features suggestions

Hello, thanks for the project! I played it with wife and now we have several features suggestions, may be you'll be interested:

  1. Possibility to undo turns - I think it would be easy as you have serialization implemented. You would be able to catch buggy situations with history saved along with the board.
  2. Possibility to turn on/off subfeatures of an expansion. For example, it would be cool to turn on just Castles from "Bridges, Castles and Bazaars" expansion
  3. Sometimes AI silly plays a tile that wouldn't benefit him in any way. One time there were a road with three different miples on it (red, blue and green). Yellow player (AI) finished that road totally irrationally.
  4. Cool home rule for bazaars: for the next round of bazaar each player can choose one of X tiles (for each player X is the same!), without any negotiations. X can be the number of players or two or any number in options.
    For example, there're three players, X = 2. Red player started a bazaar. The next player (blue) takes two tiles and chooses one of them. He plays that tile in a normal way. The next player (green) takes the tile that hadn't been chosen by the blue player and new tile from the pile. He chooses one tile and plays it in a normal way. The same with red. Bazaar had ended, the rest tile(s) are returned to the pile. EDIT: It's similar to bazaars without actual trading, but all players are in equal conditions.
  5. Misspelling in Russian (Help menu): not "Упревление", but "Управление"
  6. It's not obvious in which way the rule "Each city gives scores to a single farm" works

Winter tiles don't show

Latest build (v2.2) has new Winter mode option. When enabled, the Winter tileset is not being used.

Can't load saved game

Steps to reproduce:

  1. Begin a new game
  2. Play for a while
  3. Save the game
  4. Restart game
  5. Try to load saved game

Expected result:
Continuing saved game

Observed result:
Nothing happens.
Error log:

 [NioProcessor-6] ERROR com.jcloisterzone.game.GuiClientStub - null
java.lang.NullPointerException
    at com.jcloisterzone.rmi.mina.ClientStub.callMessageReceived(ClientStub.java:150)
    at com.jcloisterzone.rmi.mina.ClientStub.messageReceived(ClientStub.java:114)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
    at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:407)
    at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:236)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
    at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:410)
    at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:710)
    at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664)
    at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653)
    at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
    at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124)
    at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Preset saving does not work

Steps to reproduce:

  1. Start a new game
  2. Check some expansion checkboxes
  3. Enter preset name and click "Save"
  4. Start the game, put some tiles and exit (or play till the end)
  5. Restart JCloisterZone
  6. Try to create a game from preset

Expected results:

  1. Saved preset in presets list
  2. Saved preset in config.yaml

Observed result:
neither of expected results

Consider semantic versioning for version 3.1.0

In order to get an understanding of how much a release of JCZ has changed from the previous one, I propose using the semantic versioning standard, semver:


Semver summary

Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards-compatible manner, and
  3. PATCH version when you make backwards-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.


@farin: I think this pretty much follows the current style - like 3.0.2 - it's just formalized. The reason I thought of is that I think the next version might be tagged 3.1, while semver proposes to always use three numbers as in 3.1.0 so it's consistent.

feature: show connected, but already unassigned players

from
http://www.carcassonnecentral.com/community/index.php?topic=778.0

One thing - as far as I can see, the host has no way of knowing who has linked to his game. Until you enter a name for one of the followers, there is nothing to indicate that anything has happened.

It would be good if JCloisterZone (jcz) were to show the number of people are linked in on the game setup page. Even better if jcz would allow you to click on them and get some details, such as their IP address.

Plus, it would be good if the chat function were available on the game setup page. That could be useful. We are using email at this time, which works but is a bit of a workaround.

Scoring log

rfielder on .carcassonnecentral.com

Detailed audit trail of scoring - available at any time, including at game end. I have this in the Android app I use for scoring the real game, and it is very useful to see what has happened at any time.

Take Screenshots

Often we take screenshots during a game or usually at the very end and taking Print Screens can be laborious. I think it would be beneficial for users to be able to automatically save the GridLayout where tiles are placed.

@farin has rightly pointed out that most games automatically produce files such as: Screenshot_001.png rather than display a JFileChooser.

@joelpurra has also stated that we should not assume the user has write-access to the JCZ directory under screenshot; instead it should write to a default directory such as the user's home folder (like My Documents).

I have mixed opinions on the approach, as a novice JCZ user how will I know where files will be written? The JFileChooser seems to mitigate this.

To add to this last point, I think it would be sensible to introduce a new Config item such as: default_screenshot_folder so that user's can override the default folder.

makes right panel with controls resizeable

Maciej:
It would be nice if you could add a full screen mode for playing on LCD TV with larger icons. While playing from a distance it is troublesome for people using glasses to see the small icons on the right.

choose captured meeple to exchange

If another player has more than one type of meeple belonging to you (in this case B1nder had a standard meeple of mine and my phantom) and you capture one of their meeples, an exchange will automatically take place. However, I was of the opinion that I should have been able to have chosen which meeple I got back but I wasn’t given the chance. If large followers and/ or mayors/ wagons etc had been involved then this could have been even more significant.

Player with wagon can steal move from player with builder

Example case (network game).

  1. Let green player have a wagon on an uncompleted road and red player have a builder in an uncompleted city. Let green player have an ability to move the wagon (to other city, cloister or road).
  2. Red player places a tile to his city with builder and closes the green player's road.

Expected results:

  1. Red player (maybe) places a follower on the tile.
  2. Green player moves the wagon.
  3. Red player takes next tile and can place it. After it he can place a follower on this tile.

Actual results:

  1. Red player (maybe) places a follower on the tile.
  2. Green player moves the wagon.
  3. Green(!) player takes the next tile and can place it. After it he can place a red(!) follower on this tile.

Don't write files to the `JCloisterZone.jar` directory

It seems several files are written to the game directory by default. Yes, JCZ developers may use a writeable location when debugging, but it's both bad practice to write there and assume that it's writeable for others. Would still prefer a more standardized per-user storage location.

Keep in mind that Windows did a move against users having write access to program folders several years ago - "old programs that don't know better" now write to a virtual folder structure that is hidden in a completely different place (per user). Unix-based systems have had non-writeable application locations longer than that.

In lack of proper multi-platform "My Documents"/"My Save Games" path usage (unless there's a good library), System.getProperty("user.home") seems like a good start. There's also String DefaultFolder=new JFileChooser().getFileSystemView().getDefaultDirectory().toString(); and (for Windows) System.getenv("USERPROFILE"). Some strings seem Windows language dependent, like %USERPROFILE%\Saved Games
http://stackoverflow.com/questions/9677692/getting-my-documents-path-in-java
http://stackoverflow.com/questions/5590040/cross-platform-way-to-ask-for-the-users-documents-folder
https://en.wikipedia.org/wiki/Special_folder

No warning to the user if plugin folder or files are missing

When I've played debug builds with a group of friends, some have misunderstood the instructions and not installed the plugin/ folder together with JCloisterZone.jar. The game can start, except the players who haven't installed it correctly can't play their turn as they don't see any tiles.

A warning (error) that plugin files are missing would be in place.

2.2 doesn't work for remote user

Just upgraded family from 2.1.2 to 2.2. One player, who plays remotely (using port forwarding feature of router) can no longer participate. She can connect, but when game starts, she sees either a black screen or just an empty grid. We all reverted back to 2.1.2 and everything works. Note: This issue did not affect players on local lan, just remote player.

I only have TCP forwarding enabled on the router. Was there a change that needs UDP forwarding enabled as well?

Cannot start loaded game if host wasn't playing

If host of the game doesn't take part in the game (just hosting for 2 or more players), after saving, loading and players get connected back, none of the players, including host, isn't able to press "Start game" button (nothing happens).

Prepared Games

Some people at carcassonne-central suggested a new feature; basically allow people to prepare the tiles to use in a game, so that the order of the tiles is pre-determined. This can be used to set up puzzles for users to load into JCZ and determine the 'best' strategy for a match. When the list of prepared tiles is completed, the game should either end or continue at random, determined by the puzzle creator.

Such a feature would need:

  • A mechanism for the puzzle creator to define the order in which tiles are placed.
  • A mechanism for the puzzle creator to define a list of discarded tiles.
  • Make sure that the list of tiles is stored, so that puzzles can be saved and loaded by users.
  • Make sure users are aware of the number of perpared tiles in the deck.

I've made a start at implementing these features at https://github.com/Decar/JCloisterZone/tree/prepared-games

Defining a draw sequence

Currently, it seemed logical that a puzzle creator loads a YAML file (such as prepared.yaml) to define the draw sequence and discarded tiles, this is essentially the same as the debug operatives currently in place:

draw:
  - BA.RCr
  - BA.C
  - BA.CccR
  - BA.Rr
  - BA.Ccc+
  - CA.Cc+
  - AM.C!+
  - .    #A Dot should indicate that the game ends at this point.
discard:
  - BA.L
  - BA.Lr

I've created a PreparedGameConfigLoader and PreparedGameConfig to load the yaml file into an Object which can be used every time a game is started.

Loading YAML file into PreparedGameConfig

The PreparedGameConfig should be created at the start of every game, unlike the existing Config which loads when JCZ starts. I think it makes sense to add a preparePreparedGame method to the CreateGamePhase, as other game components are set up at this time.

Saving the game state

I think it's important to indicate that the Game is now a Prepared Game and that this is recorded in the Snapshot XML.
It seems logical that the snapshot contains the list of remaining prepared tiles left to play, so that someone completing the puzzle does not need to mess about with configuration files. Just load the save file:

Here's a proposed example save file:

...
<game app-version="dev-snapshot" phase="com.jcloisterzone.game.phase.TilePhase" prepared-game="true">  ###A new value for prepared
...
<tiles next="BA.CccR">
...
<prepared name="BA.Rr"/>  ###A record for each prepared tile remaning
<prepared name="BA.Ccc+"/>
</tiles>
</game>

Drawing a Tile

Currently the number of the next drawn tile is determined in the SimpleServer class in the handleGetRandSample method and this fires an event which is read by the DrawPhase.

Yesterday, I swapped out the DrawPhase with a PreparedDrawPhase, but now I see that the Tile ID should be determined by the SimpleServer. This is a much simpler solution. What I'm not clear about is what should happen if the game ends early; but the DEBUG code should provide a clear enough example.

Displaying a Prepared Game

I think it makes sense to include a new value on the right hand side to indicate the number of prepared tiles left in the deck; it will be clear to someone playing that the Game is of a different type.

wrong nickname in pre-game chat

danisthirty: the chat on the pre-game screen remains since every message looks as though it has been posted by whoever you have connected as.

Add git tags to released versions

if git tag -a v3.1.0 -m v3.1.0 <commit of the release> && git push origin v3.1.0 was used, then it would be easier to tag debug build, like git describe --tags --match 'v[0-9]*' --always --dirty='-SNAPSHOT'.

Unit tests fail

I'm using Maven 3.0.4 and Java 7 to try to compile JCloisterZone. One unit test fails, and another throws a NullPointerException.

The rev() test in com.jcloisterzone.board.LocationTest errors out because Location.N.union(Location.EL) trips a Java assertion in com.jcloisterzone.board.Location.union()

Additionally, com.jcloisterzone.board.TileTest fails to get constructed properly because of a NullPointerException with the message "Cannot load card definitions for expansion Basic game".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.