Commit Graph
1107 Commits
Author SHA1 Message Date
fjc40 ba21d81c91 Reordered modules in the main pom.xml file. Dunno :( 2017-07-20 12:10:38 +12:00
fjc40 5cddaaed8e mock.app.App now tells mock.app.Event that the xml file strings are XMLFileType.Contents.
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.
2017-07-20 01:01:29 +12:00
fjc40 4bcfc01ceb shared.dataInput:
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.
2017-07-19 23:18:52 +12:00
fjc40 10e80bca05 Moved mock.app.App#readFile(...) to shared.dataInput.XMLReader#readXMLFileToString(...).
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.
2017-07-19 22:30:21 +12:00
fjc40 d0c6b5f716 Moved mock.model and mock.dataInput tests into the racevisionGame.tests.mock package. 2017-07-19 19:25:16 +12:00
hba56 db42b3f1bb changed css to be day and night
#story[1003]
2017-07-18 23:19:00 +12:00
fjc40 1cb2829015 Removed some .idea/... files that had been commited ages ago. 2017-07-17 12:25:53 +12:00
hba56 a0a7db9f0f update the css to include a black on black option and update the colour of the water to better fit with the other colours
#story[1003]
2017-07-17 10:36:23 +12:00
hba56 01625a7bb8 added an icon for the window and basic red black and white style sheet
#story[1003]
2017-07-15 23:24:29 +12:00
hba56 fb37831ec0 added an icon for the window and basic red black and white style sheet
#story[1003]
2017-07-15 23:14:00 +12:00
Fan-Wu Yang f9b2a62f8d The Controller now takes in key presses.
- 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]
2017-07-15 20:40:23 +12:00
hba56 054816c15a fix for the pom files
#story[1006]
2017-07-14 17:07:10 +12:00
hba56 b7e2427528 fix for the pom files
#story[1006]
2017-07-14 16:48:28 +12:00
hba56 fef8540b10 fix for the pom files
#story[1006]
2017-07-12 12:09:34 +12:00
hba56 83ac3e4e33 updated the game controller to use the visualiser as the scene
#story[1006]
2017-07-12 11:59:59 +12:00
fjc40 46150bd3c6 Actually commited the previous pom.xml changes. 2017-07-11 03:21:10 +12:00
fjc40 2c5380f5d8 Removed old network files.
Renamed each test folder to test_old as tests haven't been updated to use new code!

Removed unused stuff from mock/visualiser pom.xml.
2017-07-11 03:20:49 +12:00
fjc40 2a82298571 Removed the old mock/network/visualiser files. 2017-07-11 03:13:32 +12:00
fjc40 3a85fad211 Currently, mock/pom.xml and visualiser/pom.xml build racevisionGame mock and visualiser.
Now using jetbrains nullable/notnull instead of sun (was causing maven issues).
2017-07-11 03:10:29 +12:00
fjc40 cab9bf9574 RaceClock no has run(), or is runnable, as it wasn't needed.
Refactored Sparkline a bit. Now listens to our data model instead of being manually updated. Boat position labels don't work currently, though.
VisualiserRace now also tracks the order in which boats pass each leg.
2017-07-11 02:04:53 +12:00
hba56 6ae23f039b Added basic structure for the controller module of the game application
#story[1006]
2017-07-11 00:36:49 +12:00
fjc40 7d3cf6ee80 I had accidentally broken the raceXML construction - fixed it.
Fixed a few issues where boat didn't have nextMark/previousMark times under certain circumstances.
LatestMessages wasn't actually notifying properly - fixed.
The various XML readers now treat a string constructor as containing file contents, not file name - this was how it was mostly already used.
Fixed some issues in RaceXMLReader, including where element.getChildNodes() was used instead of element.getElementsByName(...).
Boat: changes speed to a doubleProperty. Changed leg to a Property<Leg>.
Race.lastFps is now an IntegerProperty.
Added breaks to the case statements in VisualiserInput. Whoops.
ResizableRaceCanvas now handles drawing the race boundary. Tidied up code a bit.
Removed ResizableRaceMap.

Started refactoring Sparkline. Currently doesn't work.
2017-07-10 08:35:43 +12:00
fjc40 abbbf70146 Refactored Race, MockRace, and VisualiserRace to use RaceClock instead of keeping their own timers.
Moved FPS tracking to Race class, so both VisualiserRace and MockRace can monitor their FPS.
LatestMessages is now observable. It notifies observers when an XMLMessage is received.
Boat now has StringProperty for name and country/abbreviation.
Moved the MockRace timescale value to Constants.RaceTimeScale. This is passed in to MockRace on construction.
Tidied up StartController.
Copied the visualiser's resources into the resources folder.
Refactored RaceClock. Added comments. Tidied code a bit. Moved to shared.model.

Started work on RaceController.
2017-07-08 23:21:29 +12:00
fjc40 f057ad58b7 LatestMessages can hold MarkRounding messages. It also holds XMLMessage for each message type.
MockOutput now uses LatestMessages for xml messages.
Moved xml message encoding into RaceVisionByteEncoder. Removed XMLMessageEncoder.
Moved XML message sub types into an enumeration (XMLMessageType).
XMLMessage can now be queried for its attributes (like timestamp, length, etc...).

VisualiserInput now uses LatestMessages.
VisualiserInput now (as it did previously) uses switch statements for checking packet type, instead of if statements.
VisualiserRace now uses LatestMessages instead of VisualiserInput.
2017-07-07 02:05:21 +12:00
fjc40 8e18ad62ca Added LatestMessages to network.Messages. This is an object that encapsulates the latest up to date set of race messages.
Race stores a reference to it. MockRace writes to it, and eventually, VisualiserRace will read from it.
Updated MockRace, MockOutput, Event to use it.

Angle now implements hashCode().
2017-07-06 16:02:11 +12:00
fjc40 3a0b81834f Refactored mock.Event to work with MockRace.
Fixed the networking imports.
Race now keeps a reference to its Race, Boat, and Regatta data sources.
VisualiserRace can be provided with new Race/Boat/Regatta data sources during runtime. Currently it updates boundary and legs with a new RaceDataSource, and marker boats with a new BoatDataSource.
2017-07-06 15:25:00 +12:00
fjc40 8d36d89570 Refactored and moved RaceXMLReader to shared/dataInput.
RaceStatus can provide windspeed in knots in addition to mm/sec.
RaceDataSource now provides a list of participating boat sourceIDs instead of boats.
Added a RegattaDataSource interface.
Angle, Azimuth, Bearing and mutable - careful.
Boat has positionInRace.
CompoundMarks have an ID and name.
Marks can be moved (setPosition(...)).

Refactored Mock.Race, Visualiser.StreamedCourse, Visualiser.StreamedRace, into (shared) Race, MockRace, VisualiserRace.

VisualiserBoat has color.
Added xml and polar files into resources folder.
2017-07-06 01:30:55 +12:00
fjc40 7f027c8cc5 Refactored and moved XMLReader, RaceDataSource, BoatXMLReader, BoatDataSource, RegattaXMLReader to shared/dataInput. 2017-07-04 17:50:43 +12:00
fjc40 d0d63ca236 Copied remaining files into appropriate package. These need to be refactored and put into the shared package. 2017-07-04 16:22:25 +12:00
fjc40 bbbb1f2eb0 Renamed sharedModel module to racevisionGame - this is intended to be our single module program.
Moved Boat/MockBoat/VisualiserBoat into it.
Moved Polars, polarParser, VMG, and polar exception.
Moved the networking stuff into it.
Moved angle, azimuth, bearing into it.
Moved gpscoordinate into it.
Moved mark/compoundMark into it.
Moved leg into it.
Moved trackpoint into it.
2017-07-04 15:53:17 +12:00
Fraser Cope 93c1199392 Merge branch 'longMethodClassSmells' into 'master'
Long method class smells



See merge request !15
2017-07-04 14:29:55 +12:00
Jessica McAuslin 6e841f180d Spelling errors fixed. 2017-06-28 21:24:20 +12:00
Jessica McAuslin cf0adb8511 Fixed JavaDoc, spelling errors, and redundant classes
- Removed some default templates (eg: created by X)
- Wrote JavaDoc for classes that had none
- Made JavaDoc more clear for classes
- Linked JavaDoc to other classes
- Minor spelling errors fixed
- BoatInRace and BoatInRaceTest commented out (to be removed)

#story[1003]
2017-06-28 20:37:01 +12:00
Jessica McAuslin 2bbcb10458 Removed unused classes and imports
- Removed references to Constants class from other classes and tests
- ArrowController, Constants, Regatta removed
- Removed imports from various classes no longer used

#story[1003]
2017-06-26 22:29:30 +12:00
Jessica McAuslin 6ba1aca074 Annotations moved to its own class
- Annotations class sets annotations to be displayed
- removed annotation implementation from RaceController
- deconstructed previous annotation method
- fixing RaceController code smells

#story[1003]
2017-06-26 21:36:44 +12:00
Jessica McAuslin c027a0ee6e Sparkline moved to its own class
- Sparkline class creates and modifies sparkLine chart
- removed sparkline implementation from RaceController
- fixing RaceController code smells

#story[876, 1003]
2017-06-25 19:59:59 +12:00
Jessica McAuslin fdeec19b20 Wind Arrow direction fixed
- arrow shows wind direction as from instead of to
- removed old unused displayArrow method
- renamed displayFancyArrow to displayWindArrow
- removed coordinates parameter not used

#story[882, 1003]
2017-06-24 13:41:03 +12:00
Jessica McAuslin f44ea57d11 Merge branch 'master' into sprint4_master 2017-06-24 12:58:54 +12:00
Hamish Ball 992b6c91fc Merge branch 'fix_time_since_last_marker' into 'sprint4_master'
Fix time since last marker

Visualiser:
Fixed the issue where a boat's time since last mark started counting from when the race screen loaded.
It now starts counting when the race actually starts.


See merge request !13
2017-05-25 17:13:27 +12:00
fjc40 a095f15eac Fixed finish controller not being stretch and centered. 2017-05-25 16:46:24 +12:00
fjc40 42ae89d20c Merge remote-tracking branch 'origin/sprint4_master' into fix_time_since_last_marker 2017-05-25 16:22:23 +12:00
Connor Taylor Brown ea02752dc0 Merge branch 'bindWind' into 'sprint4_master'
Bind wind



See merge request !14
2017-05-25 16:09:02 +12:00
Fan-Wu Yang 512169010c Fixed Annotations and bound windarrow
- Wind arrow for the bermuda race is bound between 215 and 235 degrees
- annotations will not correctly highlight what they are showing
#story[877] #story[882]
2017-05-25 14:45:13 +12:00
fjc40 fdc03275fe Merge remote-tracking branch 'origin/sprint4_master' into fix_time_since_last_marker 2017-05-25 14:42:07 +12:00
fjc40 234748d056 Visualiser:
Fixed the issue where a boat's time since last mark started counting from when the race screen loaded.
It now starts counting when the race actually starts.
2017-05-25 14:41:51 +12:00
Fan-Wu Yang b9b03305b0 Fixed Annotations and bound windarrow
- Wind arrow for the bermuda race is bound between 215 and 235 degrees
- annotations will not correctly highlight what they are showing
#story[877] story[882]
2017-05-25 14:34:29 +12:00
Joseph Gardner 12acaeb9ea Merge branch 'story36_boundary_fix_attempt_2' into 'sprint4_master'
Fixes some issues with tacking/gybing.

Boats no longer go out of bounds, and only tack every 15 seconds.
Tested with all wind angles between [0,360] at 45 degree increments.
Also contains the visualiser wind scalar bug fix.

See merge request !12
2017-05-25 14:33:52 +12:00
Joseph Gardner e5ae2543f8 removed unneeded print statement and fixed incorrect comment (minor (2 lines)) 2017-05-25 14:30:12 +12:00
fjc40 1bd9fdd931 Merge remote-tracking branch 'origin/sprint4_master' into story36_boundary_fix_attempt_2
# Conflicts:
#	mock/src/main/java/seng302/Model/Race.java
Resolved.

Also reverted the change to the prestart and preparatory time, as they had gotten flipped around (prestart is > 3min to start, preparatory is < 1 min to start).
2017-05-25 14:04:06 +12:00
fjc40 f71e175f80 Mock.Race:
The race start time was current + prestart period + 1 second.
It is now current + prestart + 1 minute.
2017-05-25 13:53:27 +12:00