From 396c5fd662a3b0b21820383d69706d512d16370a Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Tue, 27 Jan 2009 14:36:03 -0500 Subject: Renamed MovementType's startMoving() startMoving() wasn't exactly a fit enough name for the method, so it was changed to nextMovement() --- src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java | 2 +- .../gamestate/mapview/event/movement/CustomMovementType.java | 2 +- .../fourpuzzle/gamestate/mapview/event/movement/MovementType.java | 3 +-- .../gamestate/mapview/event/movement/RandomMovementType.java | 2 +- .../gamestate/mapview/event/movement/StayStillMovementType.java | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/com/fourisland') diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java index 4f8b51c..f42cdf0 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java @@ -134,7 +134,7 @@ public class LayerEvent implements Event { private Direction moveDirection; public void startMoving(Map map) { - Direction toMove = getPossibleEvent().getMovement().startMoving(); + Direction toMove = getPossibleEvent().getMovement().nextMovement(); if (toMove != null) { diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/CustomMovementType.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/CustomMovementType.java index 5a82f91..f8f9719 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/CustomMovementType.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/CustomMovementType.java @@ -21,7 +21,7 @@ public class CustomMovementType implements MovementType { this.moves = moves; } - public Direction startMoving() + public Direction nextMovement() { if (step >= moves.length) { diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/MovementType.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/MovementType.java index 7b9ee0c..78309ae 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/MovementType.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/MovementType.java @@ -13,8 +13,7 @@ import com.fourisland.fourpuzzle.Direction; */ public interface MovementType { - // TODO Rename the following method to getNextDirection - public Direction startMoving(); + public Direction nextMovement(); } diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/RandomMovementType.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/RandomMovementType.java index b714ced..df93c6f 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/RandomMovementType.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/RandomMovementType.java @@ -14,7 +14,7 @@ import java.util.Random; */ public class RandomMovementType implements MovementType { - public Direction startMoving() + public Direction nextMovement() { Random r = new Random(); int ra = r.nextInt(1000); diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/StayStillMovementType.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/StayStillMovementType.java index 1f2a49c..2526f0f 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/StayStillMovementType.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/StayStillMovementType.java @@ -13,7 +13,7 @@ import com.fourisland.fourpuzzle.Direction; */ public class StayStillMovementType implements MovementType { - public Direction startMoving() + public Direction nextMovement() { return null; // Do nothing, stay still } -- cgit 1.4.1