- Boats now collide with marks
- Added method to MarkOrder to get all marks
- Reduced the frequency at which collisions are detected. This fixed some performance issues
- Added method to bounce the boat off a mark
Tags: #story[1117]
Created and updated methods reading yacht event packet to translate to collision alert on visualiser.
WIP: sending yacht event packet to inform collision
#story[1117]
boats now must pass through the correct way. This works for start in-race and finish gates
Refactored yacht algorithm code for better readability
Logging function added or seeing mark roundings occur
tags: #story[1124] #pair[hyi25, wmu16]
Mark rounding works for whole course (WITH BUGS)
Still some gate logic to work out.
Moved gate function to GeoUtil class
tags: #story[1124] #pair[hyi25, wmu16]
Removed RacePosition class. Instead marks are just grabbed from the mark order class when necessary.
No marks are stored as an attribute in the yacht class but the 'currentMarkSeqID' which is used to get current, and surrounding marks.
Works for all marks in between but not including starting and finishing gate as no angle can be made with them. Still to work out how to implement this
#story[1124]
Created a second prototype function which is more testable compared to the initial design. New function takes in parameters (starting marks, yacht starting position, yacht) and initialise yacht correctly with position.
#story[1117]
Loading mark sequence from RaceXML
# Loading mark sequence from RaceXML
## Change Log
1. Added MarkOrder class
* Mark order is read from the generated RaceXML and stored
* Added .getNextMark() to get the next mark in the race
* Added .equals() and .hashCode() for Marks
* NEW: Added RacePosition class to hold players position in the race
* NEW: Fixed issue where the duplicates weren't stored in the mark order
## Testing
* Unit tests in models/MarkOrderTest.java
## Acceptance Criteria
* Use the mark sequence in the raceXML
* Met by change log item (1)
* Store relevant mark details with each participating boat (Last mark, next mark)
* Method in MarkOrder to get next mark, however the last mark and next mark will need to be stored by whoever implements the second task.
See merge request !52
- Re-engineered code to work with the new marks
- Fixed bug where race order wasn't correct (added RacePosition class to fix)
- Rewrote tests to work with new RacePosition class
Tags: #story[1124] (Task 1)
This attribute is calculated at each update of the boat as prompted by the game state regularly
Removed the lat and lng attribute from the Yacht class and replaced its usage with the GeoPoint object instead
Removed redundant test files and merged GeoUtility and testGeoUtil test classes into one
tags: #story[1124] #pair[hyi25, wmu16]
- Mark order is read from the generated RaceXML and stored
- Added .getNextMark() to get the next mark in the race
- Added .equals() and .hashCode() for Marks
Tags: #story[1124] (Task 1)