Map wind rotation
Note: we'd like to generate a realistic course layout, that can vary from race to race (but not within a race, for now.) The generated layout must be sent through the API in the format given by the race.xml section of the AC35 Streaming Data Interface Specification. The AC35 Protocol (sections 31.4 and 31.5) specifies the requirements for a course:
* First leg of the course (from start line to first mark) must be a reaching leg
* Next legs are windward/leeward, and boats complete either two or three laps of this section
* Final leg to finish line may be a reaching leg
* A boat should take around 25 minutes to complete the course in the wind conditions at the start of the race (AC35 protocol, section 31.5)
You should assume that the windward/leeward marks and start/finish lines are always compounds of two marks.
Acceptance criteria:
* The layout must be sent over the API in a race.xml message, plus boat location messages for the marks as required, before any other boat location messages are sent.
* Each mark must be defined using boat "SourceID"s (see definition of race.xml) so their positions can be adjusted later.
* The course must meet the requirements given in the AC35 Protocol.
* The course limits should be set to clear all marks by at least several boat-lengths.
* The entire race area within the limits must be on the water.
See merge request !22
66. [M] As Gemma, I'd like boats and marks to act as barriers to movement so that another player cannot beat me by just ignoring marks and other boats on the course.
Note: as boats and marks don't start in overlapped positions, we are only concerned with collisions.
Acceptance criteria:
- No boat can pass within an agreed distance of the centre of another boat or mark
- Boats that hit other objects are repelled twice the agreed distance in the opposite direction to their current heading
See merge request !27
Story 61
[Agilefant link](http://agilefant.cosc.canterbury.ac.nz:8080/agilefant302/qrq.action?q=story:1095)
```
Note: the boat should be permanently circled with a highlight (or something similar)
See: (http://learn.canterbury.ac.nz/mod/forum/discuss.php?d=213948). Contains boat request to join, and server response messages.
Acceptance criteria:
- The boat that responds to control keypresses is permanently highlighted on screen.
- No boat without a highlight responds to keypresses.
```
Works with either single player or multiplayer game (see HostController.hostGamePressed()).
The race.xml currently is not updated when players join/quit, so there are 6 boats by default, and any boats without playes will just sail off the side of the map.
- resolves#39
- resolves#37
- resolves#35
- resolves#27
- resolves#25
- resolves#32
See merge request !26
Tacking and gybing merge request
Note: this allows the player to perform a common maneuver, changing tack, quickly. The goal is to change the boat's heading from one tack to another with a single keypress.
If the boat is heading upwind, the keypress will cause the boat to tack through head-to-wind, so that the wind shifts from one side of the boat to the other. The TWA (true wind angle) after tacking should be 360-TWA(before_tacking).
Similarly for gybing if the boat is initially heading downwind, except that the boat's heading always remains away from the wind.
Acceptance criteria:
- The wind shifts from one side of the boat to the other on keypress
- When heading upwind the boat should tack on keypress
- When heading downwind the boat should gybe on keypress
[Manual test](https://eng-git.canterbury.ac.nz/seng302-2017/team-7/wikis/manual-test:-tacking-and-gybing)
See merge request !24