Code Monkey home page Code Monkey logo

lospiratos's Introduction

Los Piratos de la Casa

An interactive strategic computer&board game, settled in the famous world of 17th century's Caribbean pirates.

Getting Started

Java 8 is required, both Windows and Linux are supported. To run, use maven:

mvn package cd target java -jar LosPiratos-2018.1-jar-with-dependencies.jar

JavaFX

The project uses JavaFX library.

JavaFX is standard part of Oracle Java 8 and the project can be run seamless on it. For Linux with openjdk 8, it needs to be installed, e.g with sudo apt-get install openjfx.

After this application was created, JavaFX support has been removed and later Java version don't include the library. For use with Java 11 or later, please follow JavaFX's official guide: https://openjfx.io/openjfx-docs/#introduction.

Gameplay

The game is meant to be played by 3 - 6 teams of 1 - 6 players, who are all in the same room, watching the main game view on a big screen / projector.

Intended game rules are available in the file pravidla - Los Piratos de la Casa.pdf, but only in Czech. Sorry about that. However, you can play around without knowing the exact rules, the UI is pretty expressive.

Localisation

The game text is in Czech, yet most of the UI is graphical and thus international. You can translate the game by adding a new method to the Translatable interface. In the source code, all names are in English and are expressive, thus translating them should be easy.

Versioning

Version number is in format YYYY.n where YYYY is deployment year and n is minor revision. This is convenient for the way the authors use and update the game.

Built With

Contributing

Feel free to add pull requests or open new Issues.

Authors

Credits

Special thanks to:

  • Petr Martišek (Github/martisekpetr) and Marek Basovník for inventing and designing the board game
  • Adam Hornáček (Github/Orviss) for his support and feedback regarding our code

License

See LICENSE and THIRD-PARTY.txt for more details.

lospiratos's People

Contributors

dependabot[bot] avatar jagotu avatar martisekpetr avatar teichmaa avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lospiratos's Issues

Loď nejde odebrat

Nevadí, když bude umět zrušit loď jenom ten, kdo vlastní Game, ale mělo by to jít.

Díky a nashledanou.

relogin after server restart?

Je potřeba na FE relogovat, pokud se server restartuje? Občas mi přišlo, že jo - jinak FE vypisuje chybové hlášky a není jasné co se děje

Make LoadGameFromFile and SaveGameToFile sensible

Right now these two methods are pretty weird:

public static Game LoadGameFromFile(String inputFilePath){

public static boolean SaveGameToFile(String outputFilePath, Game game, boolean append){

Why is the finally part in finally, when the catch block already returned? Or if that's intended, why is there another return?

Also, use the try (reader = new BufferedReader(new FileReader(inputFilePath))) {...} pattern.

model.GameSerializer ParseExceptions

metody třídy GameSerializer vyhazují runtime vyjímky, pokud dostanou nevalidní JSON. Je třeba to vhodně ošetřit, aby nám kvůli nim nepadala hra.

teamId do lode

Nastav prosim lodim teamId, to by nemel byt problem. Moje mapa by ho potrebovala znat. Dik.

team.shipsProperty() needs attention

If you create a method MapProperty Team.shipsProperty() or similiar, then it should be noted (e.g. as documentation comment of the method) that the resulting Map should be treated as read only and clients should not add new ships to it. Same for Game.shipsProperty().

Většina akcí vyhazuje výjimky

A to buď při recomputeCost nebo isSatisified.

com.vztekoverflow.lospiratos.Main
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
	at com.vztekoverflow.lospiratos.viewmodel.shipEntitites.enhancements.EnhancementsCatalog.getPersistentName(EnhancementsCatalog.java:62)
	at com.vztekoverflow.lospiratos.viewmodel.actions.transactions.RepairEnhancement.recomputeCost(RepairEnhancement.java:49)
	at com.vztekoverflow.lospiratos.viewmodel.actions.Action$5.computeValue(Action.java:159)
	at com.vztekoverflow.lospiratos.viewmodel.actions.Action$5.computeValue(Action.java:156)
	at javafx.beans.binding.ObjectBinding.get(ObjectBinding.java:153)
	at javafx.beans.binding.ObjectExpression.getValue(ObjectExpression.java:50)
	at com.sun.javafx.binding.ExpressionHelper.addListener(ExpressionHelper.java:54)
	at javafx.beans.binding.ObjectBinding.addListener(ObjectBinding.java:72)
	at javafx.beans.binding.BooleanBinding.bind(BooleanBinding.java:107)
	at javafx.beans.binding.Bindings$67.<init>(Bindings.java:5925)
	at javafx.beans.binding.Bindings.isNotNull(Bindings.java:5923)
	at com.vztekoverflow.lospiratos.view.controls.ActionParametersPopOver.setAction(ActionParametersPopOver.java:104)
	at com.vztekoverflow.lospiratos.view.stages.OrgStage.parametrizeAndPlan(OrgStage.java:121)
	at com.vztekoverflow.lospiratos.view.controls.ActionSelector.lambda$updateActionRoster$3(ActionSelector.java:125)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Node.fireEvent(Node.java:8413)
	at javafx.scene.control.Button.fire(Button.java:185)
	at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
	at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
	at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
	at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:394)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$353(GlassViewEventHandler.java:432)
	at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:431)
	at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
	at com.sun.glass.ui.View.notifyMouse(View.java:937)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
	at java.lang.Thread.run(Thread.java:748)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
	at com.vztekoverflow.lospiratos.viewmodel.shipEntitites.enhancements.EnhancementsCatalog.getPersistentName(EnhancementsCatalog.java:62)
	at com.vztekoverflow.lospiratos.viewmodel.actions.transactions.BuyNewEnhancement.recomputeCost(BuyNewEnhancement.java:51)
	at com.vztekoverflow.lospiratos.viewmodel.actions.Action$5.computeValue(Action.java:159)
	at com.vztekoverflow.lospiratos.viewmodel.actions.Action$5.computeValue(Action.java:156)
	at javafx.beans.binding.ObjectBinding.get(ObjectBinding.java:153)
	at javafx.beans.binding.ObjectExpression.getValue(ObjectExpression.java:50)
	at com.sun.javafx.binding.ExpressionHelper.addListener(ExpressionHelper.java:54)
	at javafx.beans.binding.ObjectBinding.addListener(ObjectBinding.java:72)
	at javafx.beans.binding.BooleanBinding.bind(BooleanBinding.java:107)
	at javafx.beans.binding.Bindings$67.<init>(Bindings.java:5925)
	at javafx.beans.binding.Bindings.isNotNull(Bindings.java:5923)
	at com.vztekoverflow.lospiratos.view.controls.ActionParametersPopOver.setAction(ActionParametersPopOver.java:104)
	at com.vztekoverflow.lospiratos.view.stages.OrgStage.parametrizeAndPlan(OrgStage.java:121)
	at com.vztekoverflow.lospiratos.view.controls.ActionSelector.lambda$updateActionRoster$3(ActionSelector.java:125)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Node.fireEvent(Node.java:8413)
	at javafx.scene.control.Button.fire(Button.java:185)
	at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
	at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
	at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
	at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:394)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$353(GlassViewEventHandler.java:432)
	at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:431)
	at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
	at com.sun.glass.ui.View.notifyMouse(View.java:937)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
	at java.lang.Thread.run(Thread.java:748)
Úno 07, 2018 6:45:14 ODP. javafx.beans.binding.Bindings$1 computeValue
WARNING: Exception while evaluating binding
java.lang.NullPointerException
	at com.vztekoverflow.lospiratos.viewmodel.actions.transactions.SellCommodity.lambda$isSatisfied$0(SellCommodity.java:40)
	at javafx.beans.binding.Bindings$1.computeValue(Bindings.java:133)
	at javafx.beans.binding.BooleanBinding.get(BooleanBinding.java:157)
	at javafx.beans.binding.BooleanExpression.getValue(BooleanExpression.java:56)
	at javafx.beans.binding.BooleanBinding.getValue(BooleanBinding.java:60)
	at com.sun.javafx.binding.ExpressionHelper.addListener(ExpressionHelper.java:54)
	at javafx.beans.binding.BooleanBinding.addListener(BooleanBinding.java:76)
	at javafx.beans.binding.BooleanBinding.bind(BooleanBinding.java:107)
	at javafx.beans.binding.Bindings$52.<init>(Bindings.java:4681)
	at javafx.beans.binding.Bindings.not(Bindings.java:4679)
	at com.vztekoverflow.lospiratos.view.controls.ActionParametersPopOver.setAction(ActionParametersPopOver.java:103)
	at com.vztekoverflow.lospiratos.view.stages.OrgStage.parametrizeAndPlan(OrgStage.java:121)
	at com.vztekoverflow.lospiratos.view.controls.ActionSelector.lambda$updateActionRoster$3(ActionSelector.java:125)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Node.fireEvent(Node.java:8413)
	at javafx.scene.control.Button.fire(Button.java:185)
	at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
	at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
	at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
	at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:394)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$353(GlassViewEventHandler.java:432)
	at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:431)
	at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
	at com.sun.glass.ui.View.notifyMouse(View.java:937)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
	at java.lang.Thread.run(Thread.java:748)

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
	at com.vztekoverflow.lospiratos.viewmodel.actions.transactions.SellCommodity.recomputeCost(SellCommodity.java:33)
	at com.vztekoverflow.lospiratos.viewmodel.actions.Action$5.computeValue(Action.java:159)
	at com.vztekoverflow.lospiratos.viewmodel.actions.Action$5.computeValue(Action.java:156)
	at javafx.beans.binding.ObjectBinding.get(ObjectBinding.java:153)
	at javafx.beans.binding.ObjectExpression.getValue(ObjectExpression.java:50)
	at com.sun.javafx.binding.ExpressionHelper.addListener(ExpressionHelper.java:54)
	at javafx.beans.binding.ObjectBinding.addListener(ObjectBinding.java:72)
	at javafx.beans.binding.BooleanBinding.bind(BooleanBinding.java:107)
	at javafx.beans.binding.Bindings$67.<init>(Bindings.java:5925)
	at javafx.beans.binding.Bindings.isNotNull(Bindings.java:5923)
	at com.vztekoverflow.lospiratos.view.controls.ActionParametersPopOver.setAction(ActionParametersPopOver.java:104)
	at com.vztekoverflow.lospiratos.view.stages.OrgStage.parametrizeAndPlan(OrgStage.java:121)
	at com.vztekoverflow.lospiratos.view.controls.ActionSelector.lambda$updateActionRoster$3(ActionSelector.java:125)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Node.fireEvent(Node.java:8413)
	at javafx.scene.control.Button.fire(Button.java:185)
	at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
	at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
	at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
	at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:394)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$353(GlassViewEventHandler.java:432)
	at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:431)
	at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
	at com.sun.glass.ui.View.notifyMouse(View.java:937)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
	at java.lang.Thread.run(Thread.java:748)
Úno 07, 2018 6:45:14 ODP. javafx.beans.binding.Bindings$1 computeValue
WARNING: Exception while evaluating binding
java.lang.NullPointerException
	at com.vztekoverflow.lospiratos.viewmodel.actions.transactions.BuyCommodity.lambda$isSatisfied$0(BuyCommodity.java:39)
	at javafx.beans.binding.Bindings$1.computeValue(Bindings.java:133)
	at javafx.beans.binding.BooleanBinding.get(BooleanBinding.java:157)
	at javafx.beans.binding.BooleanExpression.getValue(BooleanExpression.java:56)
	at javafx.beans.binding.BooleanBinding.getValue(BooleanBinding.java:60)
	at com.sun.javafx.binding.ExpressionHelper.addListener(ExpressionHelper.java:54)
	at javafx.beans.binding.BooleanBinding.addListener(BooleanBinding.java:76)
	at javafx.beans.binding.BooleanBinding.bind(BooleanBinding.java:107)
	at javafx.beans.binding.Bindings$52.<init>(Bindings.java:4681)
	at javafx.beans.binding.Bindings.not(Bindings.java:4679)
	at com.vztekoverflow.lospiratos.view.controls.ActionParametersPopOver.setAction(ActionParametersPopOver.java:103)
	at com.vztekoverflow.lospiratos.view.stages.OrgStage.parametrizeAndPlan(OrgStage.java:121)
	at com.vztekoverflow.lospiratos.view.controls.ActionSelector.lambda$updateActionRoster$3(ActionSelector.java:125)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Node.fireEvent(Node.java:8413)
	at javafx.scene.control.Button.fire(Button.java:185)
	at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
	at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
	at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
	at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:394)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$353(GlassViewEventHandler.java:432)
	at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:431)
	at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
	at com.sun.glass.ui.View.notifyMouse(View.java:937)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
	at java.lang.Thread.run(Thread.java:748)

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
	at com.vztekoverflow.lospiratos.viewmodel.actions.transactions.BuyCommodity.recomputeCost(BuyCommodity.java:33)
	at com.vztekoverflow.lospiratos.viewmodel.actions.Action$5.computeValue(Action.java:159)
	at com.vztekoverflow.lospiratos.viewmodel.actions.Action$5.computeValue(Action.java:156)
	at javafx.beans.binding.ObjectBinding.get(ObjectBinding.java:153)
	at javafx.beans.binding.ObjectExpression.getValue(ObjectExpression.java:50)
	at com.sun.javafx.binding.ExpressionHelper.addListener(ExpressionHelper.java:54)
	at javafx.beans.binding.ObjectBinding.addListener(ObjectBinding.java:72)
	at javafx.beans.binding.BooleanBinding.bind(BooleanBinding.java:107)
	at javafx.beans.binding.Bindings$67.<init>(Bindings.java:5925)
	at javafx.beans.binding.Bindings.isNotNull(Bindings.java:5923)
	at com.vztekoverflow.lospiratos.view.controls.ActionParametersPopOver.setAction(ActionParametersPopOver.java:104)
	at com.vztekoverflow.lospiratos.view.stages.OrgStage.parametrizeAndPlan(OrgStage.java:121)
	at com.vztekoverflow.lospiratos.view.controls.ActionSelector.lambda$updateActionRoster$3(ActionSelector.java:125)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Node.fireEvent(Node.java:8413)
	at javafx.scene.control.Button.fire(Button.java:185)
	at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
	at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
	at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
	at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:394)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$353(GlassViewEventHandler.java:432)
	at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:431)
	at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
	at com.sun.glass.ui.View.notifyMouse(View.java:937)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
	at java.lang.Thread.run(Thread.java:748)

Process finished with exit code 1

Ship names: uniqueness, findShipByName

Should ship names be unique (and thus possibly used as key) or not? If unique, then unique per team (allowing Team.Map<String, Ship> ships) or per game (allowing also Game.findShipByName() )? @martisekpetr

According to the answer, re-implement Team.findShipByName (possibly using Map instead of List) and maybe implement Game.findShipByName(). @teichmaa

anachorismus vyhodnocování tahů

Vidím rozpor v plánování a vyhodnocování tahů:

Zadání říká, že "Obecně lze skládat za sebe libovolné akce v libovolném pořadí" ale taky potom určuje, v jakém pořadí se akce vyhodnocují (salvy, manévry, houfnice, transakce). Jak to tedy je? Na pořadí akcí vůbec nezáleží, nebo k něčemu jsou?

A když chci provést akce "dojet do přístavu, nakoupit, jet někam dál" (to by mělo jít), jak to má uživatel zadat, a jak to má hra vyhodnotit?

Jednoduchý editor mapy

Editor mapy pro účely testování grafiky.

Měl by umět

  • dát na políčko obrázek lodičky
  • umožnit lodičku otáčet a zmenšovat

Na čem můžeš dělat v UI

  • barvy lodí na plánu podle barvy týmu
  • odlišení typů lodí na plánu
  • v seznamu lodí barevný indikátor, že loď má 0 naplánovaných akcí
  • v seznamu lodí zobrazovat rozšíření
  • dialog/něco na vyrobení nové lodi (vybrat tým, typ, kapitána; zobrazit cenu > pak nákup potvrdit)

game constants in a separate file

Put all game constants (such as Team initial money or Cannon upgrade bonus) in a separate file. This constant file should be structured (JSON?) and editable by non-programmers. The game should load constants from this file on startup.

nejdulezitejsi UI TODO

vysoka priorita:

  • pridat ke kazde lodi moznost vyhodnotit pouze tuto lod
    • Goci, pridej prosim do tridy Ship funkci evaluateActions(), ja ji pak naimplementuju
  • lod at lze vyrobit vsude (nejen v pristavu),
  • ikonka pro kloun: berani rohy (svobodni)
  • zobrazit, kdyz je lod zaretezena
    • je to v Ship.mechanicsProperty()

Dalsi veci, ktere ale nejsou TOP priority

  • if(nazev tymu = "org") shovat team v ucastnikoview
  • pridat buttonek: automaticky centrovat mapu a maximalizovat okno
  • moznost zamknout / odemknout lod (aby ji nesly planovat akce)
    • ale pouze, je-li to easy na implementaci
  • nejake tlacitko-ish na shovani vsech lod (aby byly videt suroviny v plantazich)

Dalsi shity:

  • zvyrazneni logu je prilis zvyraznujici
  • okno se pred zavrenim zepta, jestli se ma zavrit"opravdu maro"?

co ještě dodělat v UI

jsou to věci, na které jsem si nevzpomněl, když jsme spolu mluvili

  • tlačítko Evaluate Button někam dostupněji
  • moznost zobrazit/vypnout souradnice tlacitkem
  • pri zmacknuti F12 (búno) zavolat ActivatePrivilegedMode.available.set(! ActivatePrivilegedMode.available.get())
  • vrak (trida ShipWreck, dedi od MovableFigure, jako lode) by mel mit hezkou grafiku (pozadavek od Bratra, Bratr nabizi https://goo.gl/images/ByaXtL)
  • pridat moznost (pro orgy) pridat novy vrak: je na to API game.createAndAddNewDefaultShipwreck, to vrati deafultni ShipWreck, kteremu se pak musi nastavit pozice a resource. Nebo obdoba, ktera prijima parametry.
  • zrusit tlacitko na smazani tymu (tym se neda mazat z UI) (nebo tomu dopis podporu z viewmodelu (a tim padem i modelu), ja se s tim prcat nechci)
  • ? volitelne: kdyz je vic lodi v pristavu (je to casty use case), zkusit to nejak znazornit (treba cislo odpovidajici poctu lodi) (protoze kdyz jsou v pristavu 2 stejne orientovane, tak ta spodni vubec neni videt -> neni poznat ze tam je)

nefunguje plánování mortaru

Plánování mortaru z více různých lodí funguje špatně. UI nerflektuje změnu groundZero ani změnu range (Galleona má mít range 3). Po krátkém průzkumu mi přišlo, že viewmodel to updatuje správně, ale jistý si nejsem. Potřeba prozkoumat.

chyby v pravidlech

prilozena verze pravidel (pdf) mozna obsahuje nespravne informace

Ověřit část 4.3 Vyhodnocení tahů. Mám za to, že pohyb + salvy se vyhodnocují postupně, nikoliv tak jak je to napsáno.

teamId do lodi

Prosím, aby v JSON game data v ship.teamId bylo id týmu, které ji vlastní. Stačí ho počítat v server response (tj. server to tam dopíše, než to vrátí), není potřeba to nikde bindovat v modelu.

Zlepší to UX, půjde pak klikat na lodě a zobrazovat jejich detail.

Dík

Ship: todos and bugs

To yet be implemented:

  • mechanics: property, binding, corresponding API functions
  • Stats: property+binding or function that computes value, getter, adder. Similiar to MaxHP.
    • Stats to implement: cannons, currentHp, maxHp, cargo, garrison, customAdditionalSpeed
  • Resources: property, binding, getter, adder. Similiar to Team's resources.

Improvements:

  • Enhancements: rewrite API to use Map<Class<Enhancement>, Enhancement> instead of a List
  • Enhancements: use a smarter approach for ListProperty binding (in constructor, commented within code). Similiar to issue #7 .

Weird pixel_to_hex behavior

Writing a test where it attempts to highlight the corresponding HexTile should help with visual debugging.

jak funguje bermudský teleport?

Jak přesně to funguje vůči tahům? napadají mě možnosti:

  • jakmile se loď objeví na teleportu (kvůli tomu, že si tak naplánovala pohyby), hodí si kostkou (reálnou nebo na PC?) a je hned teleportována
  • teleport je speciální manévr
  • teleport se používá úplně mimo tahy
  • loď jakoby existuje na obou políčkách zároveň (omg, tohle nechci implementovat)

různě široký HP bar

různě široký HP bar pro lodě s různým max HP. Maximální maxHP pro hru: 120 (ale možná se ta hodnota bude měnit)

guarateed team and ship creation

Viewmodel: add methods that can add new ships and teams that are guaranteed to be valid (e.g. with some name as "Team #1"). Their names would be later changed by view to some value that a user desires.

Třístavové zobrazování enhancementů

UI by mělo rozlišit, jestli je enhancement active, empty nebo destroyed (třeba červeným podbarvením?). V současnosti vypadá empty a destroyed stejně.

(Pro testování lze použít Team3_Loď3, která má zničená všechna rozšíření (krom HullUpgrade, které nemá))

Jak fungují přístavy a plantáže?

  1. Co znamená být v přístavu? Znamená to přímo stát na políčku přístav? Nebo prostě stát na libovolném políčku (moři) těsně vedle přístavu? Nebo předchozí + dát akci "navštívit přístav"-like?

  2. Smí se v přístavu bojovat? Speciálně: Můžou lodě jedoucí kolem střílet na ty v přístavu? Můžou lodě z přístavu střílet na ty jedoucí kolem? Může loď v přístavu střílet na loď která je těsně vedle ní a taky v přístavu?

  3. Jak se plundruje plantáž? Přijedu k ní (na ní? stejná otázka jako 1?) a dám akci "plundrovat"? nebo něčím vystřelím? či jak?

  4. Patří někomu plantáž? Lze dobít? A dobýt?

XP bar lodi

Naiplementovat XP bar lodi (Ship.XPProperty + číslo v UI), viz Issue #25

Nefunguje zobrazení infa o lodi

Když v přehledu týmů kliknu u lodičky na ikonku [i], tak se to nepřepne na záložku s loděmi, jen se zvýrazní loď. (To, že vyskočí ActionPlaner, to asi neva - chápu, že je to tak snažší)

viewmodel: Binding of a ListProperty<> to model

In the Team class, the ListProperty 'ships' is not properly bound (its content does not reflect changes in model). Thus, adding a new ship appears in model, but does not take effect in viewmodel until a game is reloaded.

Cause: In the constructor, the listener in teamModel.shipsProperty().addListener is not implemented.

Same issue for the Game class and its ListProperty 'teams'. Here, the listener is't implemented neither and the function createAndAddNewTeam wrongly directly adds the new team to the viewmodel's list.

jak funguje experience?

Je XP (lodi/kapitána) nemozené číslo, nebo existuje nějaké maximum, které lze získat (v takovém případě bychom ukázali XP bar).

Pokud maximum existuje, mění se někdy (např. při upgrade typu lodě) nebo je konstantní pro celou hru?

Ship id

Podle modelu ma Ship ID,ale je empty. Budeme v API lod definovat jmenem, nebo na backendu spravne dopiseme id?

Values validation

We need to validate user input and give feedback for invalid input.

View is responsible for user input validation (e.g. "45hi" is not integer etc.)
Viewmiodel is repsonsible for game values validation (e.g. "45" may be set as maxHP)

Viewmodel should return Properties that extend an Validable ibnterface with boolean isValid(value) method. such Property's setter should throw an exception if given value is invalid.

It is View's responsibility to check if given prorperty is Validable and if so, to validate value before setting it.

HexGrid's z-order

Solve (or hack) proper z-ordering.

Important mainly for future UI.

modifikujici transakce

Maji chybu. Kdyz dojedes do pristavu, muzes se rovnou upgradovat a pak zrusit pohyby. Profit.

Tohle jim v pravidlech zakazeme

ovládání hry klávesnicí

Cituji zápis:

  • Aby tahy mohly jít zadávat na klávesnici, ne pouze myší (Bratr)
  • Ctrl+F jméno lodě, pak zadat akce písmeny
  • Aby se dalo rychle zadávat

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.