Balance changes. Always wanted to use that as a commit message.

#story[1274]
This commit is contained in:
Kusal Ekanayake
2017-09-23 15:09:22 +12:00
parent 364264377a
commit e9b50038a9
2 changed files with 5 additions and 6 deletions
@@ -7,8 +7,8 @@ package seng302.visualiser.fxObjects.assets_3D;
*/ */
public enum BoatMeshType { public enum BoatMeshType {
DINGHY("dinghy_hull.stl", "dinghy_mast.stl", 1.36653, "dinghy_sail.stl", 1.36653, null, false, 1.7, 1.0, 1.0), DINGHY("dinghy_hull.stl", "dinghy_mast.stl", 1.36653, "dinghy_sail.stl", 1.36653, null, false, 1.8, 1.0, 1.0),
CAT_ATE_A_MERINGUE("catamaran_hull.stl", "catamaran_mast.stl", 0.997, "catamaran_sail.stl", CATAMARAN("catamaran_hull.stl", "catamaran_mast.stl", 0.997, "catamaran_sail.stl",
0.997, null, false, 1.0, 1.4, 2.0), 0.997, null, false, 1.0, 1.4, 2.0),
PIRATE_SHIP("pirateship_hull.stl", "pirateship_mast.stl", -0.5415, "pirateship_mainsail.stl", PIRATE_SHIP("pirateship_hull.stl", "pirateship_mast.stl", -0.5415, "pirateship_mainsail.stl",
-0.5415, "pirateship_frontsail.stl", true, 1.2, 1.6, 1.2); -0.5415, "pirateship_frontsail.stl", true, 1.2, 1.6, 1.2);
@@ -19,7 +19,7 @@ public enum BoatMeshType {
public final double accelerationMultiplier; public final double accelerationMultiplier;
public final double turnStep; public final double turnStep;
final boolean fixedSail; final boolean fixedSail;
final static BoatMeshType[] boatTypes = new BoatMeshType[]{DINGHY, CAT_ATE_A_MERINGUE, PIRATE_SHIP}; final static BoatMeshType[] boatTypes = new BoatMeshType[]{DINGHY, CATAMARAN, PIRATE_SHIP};
BoatMeshType(String hullFile, String mastFile, double mastOffset, String sailFile, BoatMeshType(String hullFile, String mastFile, double mastOffset, String sailFile,
double sailOffset, String jibFile, boolean fixedSail, double maxSpeedMultiplier, double accelerationMultiplier, double turnStep) { double sailOffset, String jibFile, boolean fixedSail, double maxSpeedMultiplier, double accelerationMultiplier, double turnStep) {
@@ -36,7 +36,6 @@ public enum BoatMeshType {
} }
//TODO kre39 make something not terrible to cycle through boat types
public static BoatMeshType getNextBoatType(BoatMeshType boatType) { public static BoatMeshType getNextBoatType(BoatMeshType boatType) {
for (int i = 0; i < boatTypes.length; i++) { for (int i = 0; i < boatTypes.length; i++) {
if (i == boatTypes.length -1) { if (i == boatTypes.length -1) {
@@ -15,12 +15,12 @@ public class BoatMeshTypeTest {
public void testNextBoatMeshType() { public void testNextBoatMeshType() {
BoatMeshType currentBoat = BoatMeshType.DINGHY; BoatMeshType currentBoat = BoatMeshType.DINGHY;
BoatMeshType nextBoat = BoatMeshType.getNextBoatType(currentBoat); BoatMeshType nextBoat = BoatMeshType.getNextBoatType(currentBoat);
Assert.assertEquals(BoatMeshType.CAT_ATE_A_MERINGUE, nextBoat); Assert.assertEquals(BoatMeshType.CATAMARAN, nextBoat);
} }
@Test @Test
public void testPreviousBoatMeshType() { public void testPreviousBoatMeshType() {
BoatMeshType currentBoat = BoatMeshType.CAT_ATE_A_MERINGUE; BoatMeshType currentBoat = BoatMeshType.CATAMARAN;
BoatMeshType prevBoat = BoatMeshType.getPrevBoatType(currentBoat); BoatMeshType prevBoat = BoatMeshType.getPrevBoatType(currentBoat);
Assert.assertEquals(BoatMeshType.DINGHY, prevBoat); Assert.assertEquals(BoatMeshType.DINGHY, prevBoat);
} }