Sails are displayed on first boat in a race. Optimised imports.

- Implemented drawSails method
- Sail position is displayed and updated using a boat's heading
- Sails conform to 'Points of sail'
- Javadoc'd new method and tidied up existing
- Sped up track point frequency (visualiserBoat class)
- Optimised imports (any other classes changed)
- A lot of canvas drawing and sail rotating issues were discovered and eventually overcome along the way. Using a sail image to draw and rotate on the existing canvas rather than a JavaFX shape on a new canvas was the final decision.

#story[1098]
This commit is contained in:
Jessica Syder
2017-08-07 12:20:52 +12:00
parent 2a5d0938ff
commit 7c5670f8c2
60 changed files with 97 additions and 268 deletions
@@ -1,7 +1,5 @@
package mock.model;
import static org.junit.Assert.*;
public class MockBoatTest {
//TODO
}
@@ -1,7 +1,5 @@
package mock.model;
import static org.junit.Assert.*;
public class MockRaceTest {
//TODO
}
@@ -6,9 +6,7 @@ import org.junit.Before;
import org.junit.Test;
import shared.model.Bearing;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.Assert.*;
/**
@@ -4,7 +4,7 @@ import org.junit.Before;
import org.junit.Test;
import shared.model.Bearing;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
public class VMGTest {
@@ -13,9 +13,6 @@ import shared.dataInput.XMLReader;
import shared.exceptions.XMLReaderException;
import javax.xml.transform.TransformerException;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import static org.junit.Assert.fail;
@@ -2,10 +2,7 @@ package network.Utils;
import org.junit.Test;
import static network.Utils.AC35UnitConverter.convertGPS;
import static network.Utils.AC35UnitConverter.convertGPSToInt;
import static network.Utils.AC35UnitConverter.convertHeading;
import static network.Utils.AC35UnitConverter.convertTrueWindAngle;
import static network.Utils.AC35UnitConverter.*;
import static org.junit.Assert.assertTrue;
/**
@@ -1,6 +1,5 @@
package network.Utils;
import network.Utils.ByteConverter;
import org.junit.Test;
import java.nio.ByteOrder;
@@ -9,9 +9,6 @@ import shared.dataInput.XMLReader;
import shared.exceptions.XMLReaderException;
import javax.xml.transform.TransformerException;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import static org.junit.Assert.fail;
@@ -3,23 +3,17 @@ package shared.dataInput;
import org.junit.Before;
import org.junit.Test;
import org.xml.sax.SAXException;
import shared.enums.XMLFileType;
import shared.exceptions.InvalidBoatDataException;
import shared.exceptions.XMLReaderException;
import shared.model.Boat;
import shared.model.Mark;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.Assert.*;
/**
* Created by cbt24 on 10/05/17.
@@ -1,7 +1,5 @@
package shared.model;
import static org.junit.Assert.*;
public class AngleTest {
//TODO
}
@@ -1,7 +1,5 @@
package shared.model;
import static org.junit.Assert.*;
public class AzimuthTest {
//TODO
}
@@ -1,7 +1,5 @@
package shared.model;
import static org.junit.Assert.*;
public class BearingTest {
//TODO
}
@@ -1,7 +1,6 @@
package shared.model;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
@@ -1,7 +1,5 @@
package shared.model;
import static org.junit.Assert.*;
public class MarkTest {
//TODO
}
@@ -1,7 +1,5 @@
package shared.model;
import static org.junit.Assert.*;
public class RaceClockTest {
//TODO
}
@@ -7,7 +7,6 @@ import javafx.scene.Scene;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import visualiser.gameController.InputChecker;
/**
* Start to manually test the game controller
@@ -4,7 +4,6 @@ import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**