BannerlordCoop
BannerlordCoop copied to clipboard
Create Connection States
Behavior The connection state will manage changing the logic that represents the client on the server. States could be synced with the ClientStateLogic, but it is not required.
Design Decisions I think we want to use a design pattern similar to this. However, if a better pattern fits we can use that.
Below are the design diagrams, if anything feels off/wrong with these feel free to make updates (you will also need update permission so message @garrettluskey your gmail)
More states may be needed between initial state and loading, i.e. ConnectingState, etc... (up to you)
Design State Diagram Class Diagram
Create a new branch for this issue.
You will use the MessageBroker to communicate with other "services". Use commands to control the game, most if not all commands will give a response (if no response is given something worse has happened than this feature not working).
Definition of Done
- [ ] All states in the design are implemented
- [ ] All state methods have a test case
- [ ] All IResponse messages on fail has a test case
- [ ] Design is up to date with implementation