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
zwu18
a388989827
Reworked TackGybeCommand. Current boat in race will now tack and gybe when control is pressed.
...
#Story[1097]
2017-08-06 16:38:44 +12:00
fjc40
1fbdd09d70
Refactored BoatLocation message, encoders, decoders. It now exposes datatypes that we actually use in the program (double knots, bearings, etc..), instead of the bits-on-the-wire packed units (like int mmPerSec). Also documented it, and updated test.
...
issue #35 #36
#story[1095]
2017-08-06 16:13:25 +12:00
zwu18
18f14c7542
VMGCommand now toggles autoVMG on and off. Linked up observer and observable so the current boat can now be controlled. Fixed autoVMG not working.
...
#Story[1097]
2017-08-06 16:12:53 +12:00
fjc40
ff262a6227
Added Knots <-> MMperSec conversions to AC35UnitConverter.
...
Removed redundant/unused conversions.
Documented all of the conversions, and renamed them to pack/unpackX, to match the API spec.
Updated/added some tests in AC35UnitConverterTest.
RaceStatus now contains a Bearing instead of a packed int bearing.
RaceStatus now contains wind speed in knots, instead of MMperSec packed.
This means that only RaceStatus decoder/encoder need to care about the bits-over-wire packed values.
issue #35 #36
#story[1095]
2017-08-06 14:57:51 +12:00
zwu18
dab0f2b402
Merge branch 'story63' into CommandFactory
...
# Conflicts:
# racevisionGame/src/main/java/mock/model/commandFactory/TackGybeCommand.java
2017-08-06 14:54:21 +12:00
zwu18
074e2e590b
VMGCommand now toggles autoVMG on and off. Linked up observer and observable so the current boat can now be controlled.
...
#Story[1097]
2017-08-06 14:48:46 +12:00
zwu18
3d417c3a40
Merge branch 'story63' into CommandFactory
...
# Conflicts:
# racevisionGame/src/main/java/mock/model/MockRace.java
# racevisionGame/src/main/java/mock/model/RaceLogic.java
# racevisionGame/src/main/java/mock/model/RaceState.java
# racevisionGame/src/main/java/mock/model/commandFactory/CommandFactory.java
# racevisionGame/src/main/java/mock/model/commandFactory/VMGCommand.java
# racevisionGame/src/main/java/visualiser/gameController/ControllerServer.java
2017-08-06 13:48:41 +12:00
fjc40
b1922fc3fc
Added RaceStatusEncoder.
...
Refactored RaceStatusDecoder to be more consistent with other decoders - it now has a getMessage() function.
Added BoatStatus encoder and decoder - the RaceStatus encoder and decoder uses this for BoatStatuses. The BoatStatus encoder doesn't implement the MessageEncoder interface as BoatStatus is not a proper message type (doesn't inherit from AC35Data).
Added remaining cases to EncoderFactory, but commented them out.
BoatStatus now uses BoatStatusEnum instead of a byte.
Added some comments to RaceStatus, and it uses enums instead of bytes.
MockOutput logs a warning if a RaceStatus cannot be encoded.
Added a BoatStatusDecoderTest.
Updated RaceStatusDecoder to use new encoders/decoders.
issue #35 #36
#story[1095]
2017-08-06 13:38:27 +12:00
fjc40
b486f99dbe
Added XMLMessageEncoder.
...
Refactored XMLMessageDecoder to be consistent with other decoders - only needs to expose the XMLMessage.
Refactored BoatLocationDecoder to be consistent with other decoders - only needs to expose the BoatLocation.
Updated XMLMessageDecoderTest to use new encoder/decoder. Also tests all three message types.
Removed XMLMessageEncoderTest as it was redundant.
Updated BinaryMessageDecoderTest.xmlMessageTest() to use updated XMLMessage encoder/decoder.
issue #35 #36
#story[1095]
2017-08-06 01:01:05 +12:00
fjc40
8ef906472b
Renamed Heartbeat to HeartBeat.
...
Added HeartBeatDecoder.
Added HeartBeatEncoder.
BinaryMessageDecoder now uses HeartBeatDecoder.
MockOutput now logs a warning if a heartBeat cannot be encoded.
Added HeartBeatDecoderTest.
issue #35 #36
#story[1095]
2017-08-05 23:27:28 +12:00
fjc40
c3ed30019c
Added BoatLocationEncoder.
...
Updated BoatLocationDecoder test to use new encoder.
Updated MockOutput to use new encoder. It logs a warning if encoding fails.
#story[1095]
2017-08-05 22:11:54 +12:00
Connor Taylor-Brown
554f8a2a0f
Added WindCommand and multiple command execution to RaceLogic
...
- Dispatch commands with CompositeCommand
- Single WindCommand handles upwind and downwind logic
- Changed key bindings as Mac lacks PgUp PgDn
- ControllerServer is observable, RaceLogic updates CompositeCommand as observer
2017-08-04 23:08:07 +12:00
hba56
0b74acadff
rounding checks are now done by port or starboard side depending on what the compound marks type is
...
#story[1101]
2017-08-04 22:19:07 +12:00
hba56
db1efab225
rounding checks are now done by port or starboard side depending on what the compound marks type is
...
#story[1101]
2017-08-04 22:17:17 +12:00
zwu18
14ce5fcaff
Made changes to TackGybeCommand and VMGCommand classes to fit pattern layout.
...
#Story[1097]
2017-08-04 03:56:55 +12:00
zwu18
6e699f7037
Merge branch 'RaceFactory' into CommandFactory
2017-08-04 03:00:31 +12:00
Fan-Wu Yang
f23c3f854d
Seperated race xml creation into a class of its own
...
- Created RaceXMLCreator class
- made a function to convert limit to GPS Coordinate (limitToGPSCoordinate)
- can rotate a GPS Coordinate around a point (rotate)
- can get center of a race with (getCenter)
#story[1092]
2017-08-03 23:13:28 +12:00
Connor Taylor-Brown
851bbb4fde
Merged branch "RaceFactory" with master
2017-08-03 23:03:15 +12:00
fjc40
148108a658
CommandFactory uses BoatActionEnum instead of raw ints.
...
#story[1094]
2017-08-03 21:11:25 +12:00
Connor Taylor-Brown
c83442761c
Implemented Factory for Command objects and fixed Command Pattern implementation.
...
- Commands now have standard 0-parameter execute method
- Commands are created by CommandFactory
#story[1094]
2017-08-03 17:54:03 +12:00
Joseph Gardner
40a3ed1bb0
Boats now store whether autoVMG is on or off, boat speed scales off their bearing relative to the TWA. #story[1094]
2017-08-03 16:56:52 +12:00
hba56
f212414bd9
Added in a new basis for boats to round marks, gave mockboats a status to say how far through a rounding they are and made a method in GPScoordinate public so it can be used to calculate intersections.
...
This branch will not run the game any more as boats can't move on to the next leg until they can be controlled by the user.
#story[1087]
2017-08-03 13:27:00 +12:00
Connor Taylor-Brown
c8621a7be5
Merge branch 'RaceFactory' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into RaceFactory
2017-08-03 09:01:27 +12:00
Fan-Wu Yang
4e8d4f2433
Created Schema for Race xml's and generated classes for reading xml with xjc, made the RaceXMLReader read Corner classes in as well as making a corner class #story[1092]
2017-08-03 02:42:33 +12:00
zwu18
d9679c1497
Build failing due to junit even though junit passes all tests. Commented out VMGCommand and TackGybeCommand content.
2017-08-03 01:31:05 +12:00
Connor Taylor-Brown
2672c2b13b
Separated RaceLogic from MockRace
...
- MockRace satisfies refactor requirement for RaceState
- VisualiserRace directly implements Runnable to remove method from MockRace
#story[1094]
2017-08-03 00:32:17 +12:00
zwu18
b581b01a44
Merge branch 'RaceFactory' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into RaceFactory
...
# Conflicts:
# racevisionGame/src/main/java/mock/model/MockRace.java
2017-08-03 00:28:44 +12:00
zwu18
ad61dc6bce
Implemented runCommand method in VMGCommand and TackGybeCommand classes. Both classes currently rely on the MockRace class so changes will be required when MockRace is refactored.
...
#story[1097]
2017-08-03 00:22:46 +12:00
Connor Taylor-Brown
0466292bd0
Partially removed VMG optimisation, separated server-specific functionality
...
from MockRace into RaceServer.
#story[1094]
2017-08-02 23:39:13 +12:00
zwu18
7fc1347377
Created class TackGybeCommand which implements the CommandFactory interface.
...
#story[1097]
2017-08-02 22:28:47 +12:00
hba56
b7af4e19cf
new method to check if a boat is between gates as well as updated the gps values to fit better with real life values
...
#story[1101]
2017-08-02 18:09:12 +12:00
hba56
13922bc284
updated javadoc
...
#story[1101]
2017-08-02 17:06:52 +12:00
hba56
c633de21f5
added new methods to the mock boats to let them check which side a mark is on to them
...
#story[1101]
2017-08-02 16:33:03 +12:00
Joseph Gardner
27cf0e1539
Started splitting MockRace into RaceLogic and RaceState. #refactor #story[1094]
2017-08-02 16:31:55 +12:00
Joseph Gardner
b258e94a54
Merged wind generator into this branch. #story[1094]
2017-08-02 15:19:32 +12:00
Joseph Gardner
fba256113a
Merged wind generator into this branch. #story[1094]
2017-08-02 15:09:59 +12:00
Joseph Gardner
51bbdf9a50
Merge branch 'issue_26_wind' into RaceFactory
...
# Conflicts:
# racevisionGame/src/main/java/mock/model/MockRace.java
# racevisionGame/src/main/java/shared/model/Race.java
# racevisionGame/src/main/java/visualiser/model/VisualiserRace.java
2017-08-02 15:04:55 +12:00
fjc40
ed12ff659d
mock:
...
Moved wind generation logic and state into the WindGenerator class.
MockRace initialises this, and calls it to update wind.
2017-08-02 13:59:19 +12:00
Joseph Gardner
81eeca3533
Split wind off from Race and made it its own class. Deleted dnfChance as it is no longer used.
2017-08-02 13:45:10 +12:00
Joseph Gardner
775c32ca92
Made new branch for command architecture.
2017-08-02 12:48:56 +12:00
Joseph Gardner
a87879eaa9
Made new branch for command architecture.
2017-08-02 12:41:47 +12:00
fjc40
99f3310d8b
Created a setWind(bearing, knots) in Race, which updates the Wind with new values.
...
MockRace now uses Wind.
VisualiserRace now uses Wind.
#story[1093]
2017-08-01 18:45:17 +12:00
Fan-Wu Yang
442920f9f6
DOD, and added javadocs/fixed javadocs #story[1087]
2017-07-27 16:24:19 +12:00
Jessica Syder
402df18b71
Merge remote-tracking branch 'remotes/origin/master' into css
2017-07-27 14:31:33 +12:00
Joseph Gardner
6492ba89ab
Merging main features into story 6. App now sends and receives key strokes. #story[1007, 1089]
2017-07-27 12:36:34 +12:00
Connor Taylor-Brown
cc264f318e
Added ControllerClient and ControllerServer
...
- StartController sets up client-wide ControllerClient on socket to game server.
- RaceController now calls ControllerClient.sendKey with each keypress
- ConnectionAcceptor runs ControllerServer for each successfully connected client
#story[1089]
2017-07-26 22:57:01 +12:00
zwu18
88604df66d
Merge branch 'cbt-multi-controller' into css
...
# Conflicts:
# racevisionGame/src/main/java/mock/app/App.java
# racevisionGame/src/main/java/visualiser/Controllers/ConnectionController.java
# racevisionGame/src/main/java/visualiser/app/App.java
# racevisionGame/src/main/java/visualiser/model/RaceConnection.java
# racevisionGame/src/main/resources/visualiser/scenes/connect.fxml
2017-07-26 20:54:07 +12:00
zwu18
9c9b98f882
Added functionality to host game and join a game in lobby. Host name and game name are not implemented yet.
...
#story[1087]
2017-07-26 20:42:36 +12:00
Connor Taylor-Brown
7e3e865563
Host starts with button in ConnectionController
...
- 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]
2017-07-25 15:52:53 +12:00