- Converted Event to Singleton for configuring and hosting no more than one game instance.
- Retrieve address and port from ConnectionAcceptor
- Automatically add local host to host list
#story[1010]
- Created a GUI title screen
- Drew images to be display on the title
- Created controller for the title
- Changed visualiser main to initially display title
- Added functionality for host button
#story[1087]
- Removed xml's printing at the start as well as the amount of visualisers connected from spamming the log.
- Issue of visualisers connecting when not actually connecting was actually an visual issue as the log spits out the number of visualisers right now before the loop has gotten rid of the useless sockets.
#story[1010]
- more than one visualiser can now connect to the mock.
- Created class ConnectionAcceptor that will accept and allocate to each socket
- Issue of sockets connecting after the race starts then disconnecting will use a socket slot.
#story[1010]
Sprint5 refactor
This branch refactors most of the codebase and merges everything into a single module (racevisionGame).
This has feature parity with the master branch from what I can tell, and fixes a few bugs/issues.
However, the sparkline y axis labelling isn't exactly the same. Instead of being labelled 1, 2, 3, 4, 5, 6, it's labelled (1, 7).
Acceptance criteria:
1. Feature parity with master branch. (There's an app class in each of the mock and visualiser packages.
2. Tests all pass.
3. Code is actually tidier and easier to reason about, and documented.
See merge request !16
Made network.MessageEncoders.RaceVisionByteEncoder methods static (they were effectively static already).
shared.dataInput.XMLReader#readXMLFileToString(..) now throws an XMLReaderException if the file cannot be found.
visualiser.Controllers.StartController assumed XML messages were resource paths instead of file contents - fixed.
Testing:
networking tests now work again.
Added shared.enums.XMLFileType, which is used to specify if a string contains a file path or file contents.
Updated the XML readers to use it.
Testing:
Moved the networking tests and resources into racevisionGame module.
Moved the remaining tests from visualiser into racevisionGame, and added a few empty tests to implement later.
Did the bare minimum to get the mock.model, mock.dataInput, shared.model tests working - many of them need to be tidied/refactored/moved as they don't take into account most of the refactorings.
- Each key is now registered in an Abstract Factory which takes in an action to perform.
- Comments are added behind each function in to give some indication of how it could be extended/modified in the future.
#story[1006]