notaphplover / catan-heroes Goto Github PK
View Code? Open in Web Editor NEWA variant of the classic game
License: MIT License
A variant of the classic game
License: MIT License
The domain layer needs a player agent. A player agent interface must be implemented.
handle
able to handle any IComand
object.A game viewer is about to be implemented.
It demands a way to recreate a game.
In addition, some actions cannot be performed twice in a turn.
For now, the game log features must be declared as an interface IGameLog
CatanGameEngine must receive an IGameLog
instance to store
An implementation of the interface must be added.
It's recommended to use a TreeMap
of turn numbers to ArrayList
of IRequest
Important: this is a first approach. AI features could demand a develop iteration.
Our README.md sucks :(
A Build initial settlement request must be implemented.
GameState.FOUNDATION
.Agnostic request were implemented, but the test classes associated require a refactor.
Every command must be serializable
Add the appropiate calls in the engine handlers (see #67 )
getResourcesQuantity is a better name
Catan game handlers need manage the log and request notifications to players.
Any command sent before this management process will not contain the last request handled.
This bug can be fixed sending the command as a post success action.
Edit: handlers are correctly implemented, so this issue consist in adding the test
CatanEditableBoard has no tests.
Unit tests must be implemented in order to ensure the minimun software quality demanded.
There is a game and a game engine. It does not make sense that hierachy. A single class and a single interface must remain.
Nested test classes would allow us to improve the readability of our test code. It's hard to know which cases are covered with the actual code.
This project must be usable by other maven/gradle projects.
This guide could be followed in order to achieve this: https://docs.gradle.org/current/userguide/publishing_maven.html.
Even if there is no way to cheat the engine just performing requests, maybe it should be desirable that only trade request could be accepted in the middle of a request
Since #94 , too many request handler tests are expressed as game tests.
Tests must be refactored to avoid this.
All this facts demands a CQRS pattern.
Consider using Axon messaging.
Our clients demands initial build element request in order to start a game.
Catan editable board should not rebuild the production map
The end of the foundation phase must be implemented.
The end turn handler must detect the end of the foundation phase and change the game state
Maybe you could do this differently. Whenever this function is called, a new map is created unnecessarily.
Player.compareTo is implemented as the difference between id values.
Player.compareTo should rely on its attribute's compareTo implementation instead.
Gradle is a must in order to perform CI, automatic code style and other stuff
The game needs a tool to send commands to the players.
A Build initial connection request must be implemented.
GameState.FOUNDATION
./home/runner/work/catan-heroes/catan-heroes/src/com/catanheroes/core/game/log/IGameLog.java:23: warning: no @param for turn
Fix CatanGameEngine.handleStartTurnRequest. This handler must produce resources only if the game state is the normal phase.
Use google's convention: https://google.github.io/styleguide/javaguide.html#s4.8.1-enum-classes
Maven central has its own POM requirements. They must be fullfilled in order to publish a release.
Invalid POM: /io/github/notaphplover/catan-core/0.3.0/catan-core-0.3.0.pom: Project name missing, Project description missing, Project URL missing, License information missing, SCM URL missing, Developer information missing
In line 112 at the file src/com/ucm/dasi/catan/board/CatanBoard.java it's recommended to implement a runtime expcetion to handle this situation.
Almost any client library would require serialization layer able to serialize requests.
In order to achieve this, it's required a request getter which does not modify a player instance.
Collection<IRequest> emptyMissing()
must be removed.Collection<IRequest> getMissingRequests()
must be added.void emptyMissingRequests()
must be added.Lots of code lines perform player comparisons throught its id.
A Player equals algorithm must be implemented and used instead of that comparison.
Implement a deterministic subject distribution system as agreed.
CatanBoard and CatanEditableBoard must be a single class.
The logic to store the production must be moved to a new class ProductionManager
I realice that several parts of the code demand an inmutable resource manager. We are currently solving this cloning entities to ensure data is not updated, but it's just a workaround.
An interface and a class must be implemented in order to satisfy that requirements.
cc @abvg9
The main package must be com.catanheroes.core
Checks to ensure a valid build are different from the ones used to ensure valid upgrades. The reindex strategy for the board is also different. Clients will never need a common request: they know when to use a build request or an upgrade request.
cc @abvg9
The game now calculates the active player based on turnNumber % players.length
.
Any command must contain the history of changes of the current turn in order to allow player agents to sync its inner state.
It should be called getResourceManager instead.
Important: This feature requires #66, #68 to be closed before starting any development process related to this issue.
The game needs a tool to send commands to the players.
Catan game and Catan game engine have too many constructor arguments. A builder class should be implemented to avoid this.
See https://stackoverflow.com/questions/40264/how-many-constructor-arguments-is-too-many
A trade system must be implemented in order to allow clients to trade resources.
Trade requests details are the following ones:
It would be reasonable to use a wildcard value in order to reduce the size of the acceptable trades collection.
Tests must be grouped using JUnit 5 annotations.
Communication could be too complex if the engine is able to process a batch of requests.
The game engine must be refactored in order to process just a single request.
Important: This task is probably a bottleneck in the develop process.
In line 177 at the file src/com/ucm/dasi/catan/board/CatanBoard.java it's recommended to implement a runtime expcetion to handle this situation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.