mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Merge branch 'add-speed-to-starting-list' into 'master'
Moved boat velocity to starting list Tags: #fix See merge request !12
This commit is contained in:
+3
-1
@@ -174,4 +174,6 @@ local.properties
|
|||||||
.springBeans
|
.springBeans
|
||||||
|
|
||||||
# Code Recommenders
|
# Code Recommenders
|
||||||
.recommenders/
|
.recommenders/
|
||||||
|
|
||||||
|
Makefile
|
||||||
|
|||||||
@@ -93,8 +93,7 @@ public class Event {
|
|||||||
*/
|
*/
|
||||||
public String getEventString(){
|
public String getEventString(){
|
||||||
String currentHeading = Integer.toString(this.getLeg().getHeading());
|
String currentHeading = Integer.toString(this.getLeg().getHeading());
|
||||||
String velocityKnots = String.format("%1.2f", this.getBoat().getVelocity() * 1.943844492); // Convert meters/second to knots
|
|
||||||
|
|
||||||
return (this.getTimeString() + ", " + this.getBoat().getTeamName() + " passed " + this.getLeg().getMarkerLabel() + " going heading " + currentHeading + " at " + velocityKnots + " knots.");
|
return (this.getTimeString() + ", " + this.getBoat().getTeamName() + " passed " + this.getLeg().getMarkerLabel() + " going heading " + currentHeading + "°");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,9 @@ public class Race {
|
|||||||
System.out.println("######################");
|
System.out.println("######################");
|
||||||
|
|
||||||
for (int i = 0; i < numberOfBoats; i++) {
|
for (int i = 0; i < numberOfBoats; i++) {
|
||||||
System.out.println(boats[i].getTeamName());
|
String velocityKnots = String.format("%1.2f", boats[i].getVelocity() * 1.943844492);
|
||||||
|
|
||||||
|
System.out.println(boats[i].getTeamName() + " Velocity: " + velocityKnots);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user