Commit Graph
982 Commits
Author SHA1 Message Date
zwu18 c3ea62dfee Merge branch 'master' into CommandFactory
# Conflicts:
#	racevisionGame/src/main/java/mock/app/ConnectionAcceptor.java
#	racevisionGame/src/main/java/mock/app/Event.java
#	racevisionGame/src/main/java/mock/model/commandFactory/TackGybeCommand.java
#	racevisionGame/src/main/java/mock/model/commandFactory/VMGCommand.java
#	racevisionGame/src/main/java/visualiser/gameController/ControllerServer.java
2017-08-12 03:18:24 +12:00
zwu18 9c902dab46 Added javadoc to classes.
#story[1097]
2017-08-12 02:11:23 +12:00
fjc40 6e5fb62880 Added REQUEST_RECEIVED and DECLINED to ConnnectionStateEnum.
#story[1095]
2017-08-12 01:05:45 +12:00
fjc40 41b0a5d7f7 Merge branch 'story_61' of eng-git.canterbury.ac.nz:seng302-2017/team-7 into story_61 2017-08-11 22:38:55 +12:00
fjc40 b625b6ab05 XMLReader.readXMLFileToString no longer throws a Transformer exception. 2017-08-11 22:38:39 +12:00
zwu18 e4b72fdfeb Update appearance on client arrow.
#story[1095]
2017-08-11 20:38:54 +12:00
Connor Taylor-Brown 7474de9816 Created foundation classes and interfaces for collision architecture.
- Added Collider interface
- Added Collision class
- Added ColliderRegistry class

#story[1100]
2017-08-11 14:05:36 +12:00
fjc40 61d18f85c5 javadoc fixes. 2017-08-10 23:57:54 +12:00
fjc40 19984772c0 Merge branch 'master' into story_61
Also got client-server handshake working. Multiple clients can connect and control their own boat.
The client's boat has a larger black triangle drawn around it. Probably needs tidying up.
Added isClientBoat boolean to VisualiserBoat.

WindGenerator is now an interface, implemented by ConstantWindGenerator (useful for testing) and RandomWindGenerator. Added ConstantWindGeneratorTest.
RandomWindGenerator was formerly WindGenerator.
The WindGenerator is passed in to MockRace.

CommandFactory throws a CommandConstructionException if it cannot create a command.

MessageSerialiser and MessageDeserialiser correctly terminate on error.

Readded VisualiserInput's switch statement in the main loop, pending a refactor.

Removed the sleep statement from LobbyController - it was blocking javaFX thread.

Lobby.fxml: moved buttons and text input into grid panes, so they don't break when you resize screen.

Added some test object creation functions in several test classes (MockRaceTest.createMockRace(), BoatXMLReaderTest.createBoatDataSource(), etc...).

#story[1095]
2017-08-10 23:49:21 +12:00
Fraser Cope a8af866228 Merge branch 'pom_profile_fix' into 'master'
Pom profile fix

The racevisionGame pom still had "profiles", which aren't needed with a single jar build, and the built jar didn't have a mainifest/main class.

See merge request !19
2017-08-10 13:29:05 +12:00
fjc40 5bc51343f5 Merge remote-tracking branch 'origin/master' into pom_profile_fix 2017-08-10 13:25:08 +12:00
Fraser Cope cdb6219cce Merge branch 'issue_28_36_decoders' into 'master'
Issue 28 & 36 - encoders and decoders refactor

This resolves #28 #36.
This was on the story_61 branch, but I figured it may be helpful to push this into master/other branches before then.

The main changes:
- Moved encoding functions from RaceVisionByteEncoder into their own encoder classes.
- Added a EncoderFactory and DecoderFactory, which return correct en/decoder based on MessageType.
- All encoders implement MessageEncoder interface, and all decoder implement MessageDecoder interface.

Extra changes:
- Added names to most threads that are created.
- Removed the nested while loop from MockOutput, and moved the XML stuff before the main loop (functionally it's the same).

See merge request !23
2017-08-10 13:21:42 +12:00
fjc40 130ffcbf07 Fixed some merge issues. 2017-08-10 13:16:53 +12:00
fjc40 805c12bf41 Merge remote-tracking branch 'origin/master' into issue_28_36_decoders
# Conflicts:
#	racevisionGame/src/main/java/mock/app/ConnectionAcceptor.java
#	racevisionGame/src/main/java/mock/app/Event.java
#	racevisionGame/src/main/java/visualiser/gameController/ControllerServer.java
2017-08-10 13:12:26 +12:00
Fraser Cope 7b382e48ac Merge branch 'story63' into 'master'
63. [C, M] I'd like to be able to make small adjustments to the heading of my boat, as Gemma, either upwind or downwind.

Note: each keypress should change the boat's heading by a small amount (3 degrees?) Pressing the 'upwind' key will turn the boat's head towards the wind by that small amount, while the 'downwind' key will do the opposite. Continuing to press the downwind key when the boat is already heading straight downwind, or upwind when heading directly upwind, achieves nothing.

Acceptance criteria:

- The player boat turns towards wind a small amount for each press of the 'upwind' key.
- The player boat turns away from the wind by a small amount for each press of the 'downwind' key.
- If the boat heading is directly into wind after a series of 'upwind' keypresses, the heading will continue to change in the same direction for one more keypress.
- Substitute 'downwind' for 'upwind' for the downwind case.


See merge request !21
2017-08-10 12:57:21 +12:00
fjc40 39b5cc2edc MockBoat has autoVMG disabled by default.
Wind/Tack commands disable autoVMG. VMG command enables it.
Upwind command was turning until boat was at 0 degrees, instead of being aligned with wind direction, but that's fixed.
#story[1096]
2017-08-10 12:44:42 +12:00
hba56 4da3734804 added the ability to toggle the race guide line on and off
#story[1087]
2017-08-10 12:17:19 +12:00
fjc40 7cc39abe57 WIP. Probably need to cherry pick stuff out of here.
Added ClientConnection and server-side handshake.
Added MessageSerialiser and Deserialiser.
#story[1095]
2017-08-10 12:13:40 +12:00
hba56 74f04a13f8 Merge remote-tracking branch 'origin/Development' into Development 2017-08-09 23:27:04 +12:00
hba56 e53d72f24b compound marks now can give the mark they have that needs to be rounded this is used to draw the line around the correct mark
#story[1101]
2017-08-09 23:25:42 +12:00
Connor Taylor-Brown da9915174c Merge branch 'master' into Development 2017-08-09 23:05:07 +12:00
Connor Taylor-Brown 3cf0cf2ee0 Merge branch 'master' into story63 2017-08-09 22:56:55 +12:00
Connor Taylor-Brown 638413da1a Merge remote-tracking branch 'remotes/origin/story63' into Development 2017-08-09 22:46:26 +12:00
zwu18 03713d3699 Added checkPosition into MockRace which was removed. Boat now updates legs again.
#Story[1097]
2017-08-09 16:37:29 +12:00
Connor Taylor-Brown e021dd328d Changed CompositeCommand stack to queue
#story[1096]
2017-08-08 23:56:59 +12:00
hba56 e2605c3c7c Merge remote-tracking branch 'remotes/origin/story68' into Development 2017-08-08 23:29:57 +12:00
hba56 bb75806781 Cleaned up line to be in a shippable shape
#story[1101]
2017-08-08 23:23:46 +12:00
fjc40 3ec87582d3 Merge remote-tracking branch 'origin/master' into story_61 2017-08-08 20:58:53 +12:00
David Wu 568458aca4 Merge branch 'story48' into 'master'
Story48 & issue 26

This is the merge request for story 48 (http://agilefant.cosc.canterbury.ac.nz:8080/agilefant302/editProject.action?projectId=61#fi.hut.soberit.agilefant.model.Story_1093) ( #29 ) and issue #26.

A.C:
- Wind speed and direction must follow that provided by the Race Status message or messages.
- Arrow aligned with the current wind direction shown on the live race view.
- Arrow orientation adjusts within 1s when changes in the wind direction are received.
- Arrow length is proportional to wind speed.
- Wind speed in m/s (or as defined in story 17) should be easily estimated from the wind arrow.

The wind speed (TWS) should be shown as both a number and in the length of the wind arrow. The arrow length should be always long enough for TWA (wind direction) to be clear; the length should never drop below some minimum value.  

This includes issue #26 as story 48 was slightly dependent on that.

Both #29 and issue #26 should be closed once this has been merged.

See merge request !20
2017-08-08 20:50:41 +12:00
hba56 22722286ef all paths now join up
#story[1087]
2017-08-08 14:47:11 +12:00
zwu18 53c9192130 Merge branch 'CommandFactory' into Development
# Conflicts:
#	racevisionGame/src/main/java/visualiser/gameController/ControllerServer.java
2017-08-08 02:52:29 +12:00
hba56 ef3f468b19 arrows displayed for each leg
#story[1101]
2017-08-08 00:02:07 +12:00
cbt24 2920b6cf23 Removed build-breaking code from MockRace
#story[1096]
2017-08-07 16:47:25 +12:00
Fan-Wu Yang a460df3e4d Fixed Javadocs that were causing the build to fail. #story[1096] 2017-08-07 16:30:06 +12:00
Fan-Wu Yang 0f9b191ccb Added doc strings to RaceXML Creator #story[1096] 2017-08-07 16:13:15 +12:00
Connor Taylor-Brown 8ee4e84236 Merge remote-tracking branch 'remotes/origin/story63' into Development
# Conflicts:
#	racevisionGame/src/main/java/mock/model/MockBoat.java
#	racevisionGame/src/main/java/mock/model/MockRace.java
2017-08-07 15:02:13 +12:00
Connor Taylor-Brown dad4fa57c6 Fixed WindCommand not updating downwind command when moving upwind.
#story[1096]
2017-08-07 14:51:32 +12:00
Connor Taylor-Brown 55798447ab Cherry-picked CommandFactory connection between ControllerServer and RaceLogic.
#story[1096]
2017-08-07 14:25:30 +12:00
Connor Taylor-Brown e76de1cbf9 Added test for WindCommand
#story[1096]
2017-08-07 14:13:14 +12:00
fjc40 634d78ab70 Added names to threads created.
MockOutput had a nested while loop, but it wasn't needed. Also tidied some of the error handling in MockOutput.

#story[1095]
2017-08-07 13:42:50 +12:00
hba56 62752c142a building blocks for drawing the race line around the course
#story[1087]
2017-08-07 12:47:55 +12:00
hba56 747c31b948 Merge remote-tracking branch 'remotes/origin/story68' into Development 2017-08-07 12:29:56 +12:00
hba56 4195d41814 removed outdated comments
#story[1087]
2017-08-07 12:28:44 +12:00
hba56 950a801d16 rounding fix for the xml
#story[1087]
2017-08-07 12:16:37 +12:00
Joseph Gardner 0bf2c6106b Boat updating speed after key press has been fixed. #fix #story[1094] 2017-08-07 12:03:34 +12:00
zwu18 ddaa2623ca Added tests for TackGybeCommand class.
#Story[1097]
2017-08-07 02:56:24 +12:00
Fan-Wu Yang fef35d0b00 The race is rotated with it's initial rotation in mind
- RaceXMLCreator now checks the bearing of the race with getLineAngle()
- Split some methods into functions so that it is more readable
#story[1096]
2017-08-07 02:37:05 +12:00
Fan-Wu Yang 2ce1c0786e The course points can now be rotated,
- Created markToGPSCoordinate Class
- Added Rotation to marks
#story[1092]
2017-08-07 02:01:41 +12:00
fjc40 134586f407 The message encoders and decoders now catch exceptions, and throw InvalidMessageException.
Removed the big switch statement from BinaryMessageDecoder - it now uses the decoder factory instead.
issue #35 #36
#story[1095]
2017-08-06 22:25:43 +12:00
fjc40 9c64b678e3 Added MarkRoundingEncoder.
Refactored MarkRoundingDecoder - it now implements MessageDecoder.
Tidied up MarkRounding - it is now documented and has getters. Also Created MarkRoundingBoatStatusEnum, MarkRoundingIDEnum, MarkRoundingSideEnum, MarkRoundingTypeEnum.
Added MarkRoundingDecoderTest.
issue #35 #36
#story[1095]
2017-08-06 21:38:12 +12:00