summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-01-27 14:36:03 -0500
committerStarla Insigna <hatkirby@fourisland.com>2009-01-27 14:36:03 -0500
commit396c5fd662a3b0b21820383d69706d512d16370a (patch)
treeddee404e2e6fd5e5d1d0c224bf9f107c3d6e24e0 /src
parent9b87de6625fd152cd69fbbe402de054cf1314a6e (diff)
downloadfourpuzzle-396c5fd662a3b0b21820383d69706d512d16370a.tar.gz
fourpuzzle-396c5fd662a3b0b21820383d69706d512d16370a.tar.bz2
fourpuzzle-396c5fd662a3b0b21820383d69706d512d16370a.zip
Renamed MovementType's startMoving()
startMoving() wasn't exactly a fit enough name for the method, so it was changed to nextMovement()
Diffstat (limited to 'src')
-rw-r--r--src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java2
-rw-r--r--src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/CustomMovementType.java2
-rw-r--r--src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/MovementType.java3
-rw-r--r--src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/RandomMovementType.java2
-rw-r--r--src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/StayStillMovementType.java2
5 files changed, 5 insertions, 6 deletions
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 {
134 private Direction moveDirection; 134 private Direction moveDirection;
135 public void startMoving(Map map) 135 public void startMoving(Map map)
136 { 136 {
137 Direction toMove = getPossibleEvent().getMovement().startMoving(); 137 Direction toMove = getPossibleEvent().getMovement().nextMovement();
138 138
139 if (toMove != null) 139 if (toMove != null)
140 { 140 {
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 {
21 this.moves = moves; 21 this.moves = moves;
22 } 22 }
23 23
24 public Direction startMoving() 24 public Direction nextMovement()
25 { 25 {
26 if (step >= moves.length) 26 if (step >= moves.length)
27 { 27 {
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;
13 */ 13 */
14public interface MovementType { 14public interface MovementType {
15 15
16 // TODO Rename the following method to getNextDirection 16 public Direction nextMovement();
17 public Direction startMoving();
18 17
19} 18}
20 19
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;
14 */ 14 */
15public class RandomMovementType implements MovementType { 15public class RandomMovementType implements MovementType {
16 16
17 public Direction startMoving() 17 public Direction nextMovement()
18 { 18 {
19 Random r = new Random(); 19 Random r = new Random();
20 int ra = r.nextInt(1000); 20 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;
13 */ 13 */
14public class StayStillMovementType implements MovementType { 14public class StayStillMovementType implements MovementType {
15 15
16 public Direction startMoving() 16 public Direction nextMovement()
17 { 17 {
18 return null; // Do nothing, stay still 18 return null; // Do nothing, stay still
19 } 19 }