This commit is contained in:
Michael Rausch
2017-03-30 14:46:22 +13:00
6 changed files with 7 additions and 155 deletions
@@ -150,7 +150,7 @@ public class CanvasController {
*/
private void drawWake(GraphicsContext gc, double x, double y, double speed, Color color, double heading){
double angle = Math.toRadians(heading);
speed = speed * 0.5; // Half the size of the wake
speed = speed * 10;
Point newP = new Point(0, speed);
newP.rotate(angle);
+6 -6
View File
@@ -4,31 +4,31 @@
<team>
<name>Oracle Team USA</name>
<alias>USA</alias>
<velocity>30.9</velocity>
<velocity>1</velocity>
</team>
<team>
<name>Artemis Racing</name>
<alias>ART</alias>
<velocity>59.3</velocity>
<velocity>1.1</velocity>
</team>
<team>
<name>Emirates Team New Zealand</name>
<alias>NZL</alias>
<velocity>51.5</velocity>
<velocity>2</velocity>
</team>
<team>
<name>Land Rover BAR</name>
<alias>BAR</alias>
<velocity>29.9</velocity>
<velocity>1.3</velocity>
</team>
<team>
<name>SoftBank Team Japan</name>
<alias>JAP</alias>
<velocity>99.6</velocity>
<velocity>1.7</velocity>
</team>
<team>
<name>Groupama Team France</name>
<alias>FRC</alias>
<velocity>45.6</velocity>
<velocity>1.4</velocity>
</team>
</teams>
@@ -1,34 +0,0 @@
package seng302.controllers;
import org.junit.Test;
//import static org.mockito.Mockito.when;
/**
* Created by ptg19 on 23/03/17.
*/
public class BoatPositionControllerTest {
@Test
public void handleEvent() throws Exception {
// BoatPositionController controller = new BoatPositionController();
// Boat boat1 = new Boat("boat1");
// Boat boat2 = new Boat("boat2");
// Boat boat3 = new Boat("boat3");
//
// Event event1 = new Event(1.0, boat1, new SingleMark("mark0"), new SingleMark("mark1"), 0);
// Event event2 = new Event(1.0, boat2, new SingleMark("mark0"), new SingleMark("mark1"), 0);
// Event event3 = new Event(1.0, boat3, new SingleMark("mark0"), new SingleMark("mark1"), 0);
// controller.handleEvent(event1);
// controller.handleEvent(event2);
// controller.handleEvent(event3);
// assertEquals(controller.getBoatOrder(), new ArrayList<Boat>(Arrays.asList(boat1, boat2, boat3)));
// Event event4 = new Event(1.0, boat3, new SingleMark("mark1"), new SingleMark("mark2"), 0);
// Event event5 = new Event(1.0, boat3, new SingleMark("mark1"), new SingleMark("mark2"), 1);
// Event event6 = new Event(1.0, boat3, new SingleMark("mark1"), new SingleMark("mark2"), 1);
// Event event7 = new Event(1.0, boat3, new SingleMark("mark1"), new SingleMark("mark2"), 1);
// Event event8 = new Event(1.0, boat3, new SingleMark("mark1"), new SingleMark("mark2"), 1);
// Event event9 = new Event(1.0, boat3, new SingleMark("mark1"), new SingleMark("mark2"), 1);
}
}