mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Fixed sail toggling issues and test.
This commit is contained in:
@@ -40,7 +40,7 @@ public class ClientYacht extends Observable {
|
|||||||
private String country;
|
private String country;
|
||||||
|
|
||||||
private Long estimateTimeAtFinish;
|
private Long estimateTimeAtFinish;
|
||||||
private Boolean sailIn = false;
|
private Boolean sailIn = true;
|
||||||
private Integer currentMarkSeqID = 0;
|
private Integer currentMarkSeqID = 0;
|
||||||
private Long markRoundTime;
|
private Long markRoundTime;
|
||||||
private Long timeTillNext;
|
private Long timeTillNext;
|
||||||
|
|||||||
@@ -674,6 +674,7 @@ public class GameView extends Pane {
|
|||||||
|
|
||||||
public void setBoatAsPlayer (ClientYacht playerYacht) {
|
public void setBoatAsPlayer (ClientYacht playerYacht) {
|
||||||
this.playerYacht = playerYacht;
|
this.playerYacht = playerYacht;
|
||||||
|
playerYacht.toggleSail();
|
||||||
boatObjects.get(playerYacht).setAsPlayer();
|
boatObjects.get(playerYacht).setAsPlayer();
|
||||||
annotations.get(playerYacht).addAnnotation(
|
annotations.get(playerYacht).addAnnotation(
|
||||||
"velocity",
|
"velocity",
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ public class BoatSailAnimationToggleTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void sailToggleTest() throws Exception {
|
public void sailToggleTest() throws Exception {
|
||||||
assertFalse(yacht.getSailIn());
|
|
||||||
yacht.toggleSail();
|
|
||||||
assertTrue(yacht.getSailIn());
|
assertTrue(yacht.getSailIn());
|
||||||
|
yacht.toggleSail();
|
||||||
|
assertFalse(yacht.getSailIn());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user