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 Long estimateTimeAtFinish;
|
||||
private Boolean sailIn = false;
|
||||
private Boolean sailIn = true;
|
||||
private Integer currentMarkSeqID = 0;
|
||||
private Long markRoundTime;
|
||||
private Long timeTillNext;
|
||||
|
||||
@@ -674,6 +674,7 @@ public class GameView extends Pane {
|
||||
|
||||
public void setBoatAsPlayer (ClientYacht playerYacht) {
|
||||
this.playerYacht = playerYacht;
|
||||
playerYacht.toggleSail();
|
||||
boatObjects.get(playerYacht).setAsPlayer();
|
||||
annotations.get(playerYacht).addAnnotation(
|
||||
"velocity",
|
||||
|
||||
@@ -21,9 +21,9 @@ public class BoatSailAnimationToggleTest {
|
||||
|
||||
@Test
|
||||
public void sailToggleTest() throws Exception {
|
||||
assertFalse(yacht.getSailIn());
|
||||
yacht.toggleSail();
|
||||
assertTrue(yacht.getSailIn());
|
||||
yacht.toggleSail();
|
||||
assertFalse(yacht.getSailIn());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user