From 77a0ab8efb59cb86c2dfb57be2d41a80e12884ba Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Mon, 2 Feb 2009 19:05:33 -0500 Subject: Added JavaDoc to many classes --- .../mapview/event/graphic/BlankEventGraphic.java | 1 + .../mapview/event/graphic/CharSetEventGraphic.java | 1 + .../mapview/event/graphic/EventGraphic.java | 1 + .../mapview/event/movement/CustomMovementType.java | 3 +++ .../mapview/event/movement/MovementType.java | 4 +++ .../mapview/event/movement/RandomMovementType.java | 1 + .../event/movement/StayStillMovementType.java | 1 + .../precondition/HeroInPartyPrecondition.java | 2 ++ .../event/precondition/HeroLevelPrecondition.java | 30 ---------------------- .../mapview/event/precondition/Precondition.java | 6 +++++ .../event/precondition/SwitchPrecondition.java | 1 + .../precondition/VariableNumberPrecondition.java | 2 ++ .../precondition/VariableVariablePrecondition.java | 2 ++ .../mapview/event/specialmove/FaceMoveEvent.java | 3 ++- .../specialmove/LoopUntilCollisionMoveEvent.java | 7 ++++- .../mapview/event/specialmove/MoveEvent.java | 4 ++- .../mapview/event/specialmove/StepMoveEvent.java | 1 + .../mapview/event/specialmove/WaitMoveEvent.java | 3 ++- 18 files changed, 39 insertions(+), 34 deletions(-) delete mode 100644 src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/HeroLevelPrecondition.java (limited to 'src') diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/BlankEventGraphic.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/BlankEventGraphic.java index 1f317f8..77d383f 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/BlankEventGraphic.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/BlankEventGraphic.java @@ -9,6 +9,7 @@ import com.fourisland.fourpuzzle.Direction; import java.awt.image.BufferedImage; /** + * BlankEventGraphic specifies an Event without an image. * * @author hatkirby */ diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/CharSetEventGraphic.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/CharSetEventGraphic.java index a2e8831..6064f24 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/CharSetEventGraphic.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/CharSetEventGraphic.java @@ -10,6 +10,7 @@ import com.fourisland.fourpuzzle.gamestate.mapview.CharSet; import java.awt.image.BufferedImage; /** + * CharSetEventGraphic specifes an Event with an image from a CharSet. * * @author hatkirby */ diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/EventGraphic.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/EventGraphic.java index 7e83dd9..2cf9497 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/EventGraphic.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/EventGraphic.java @@ -9,6 +9,7 @@ import com.fourisland.fourpuzzle.Direction; import java.awt.image.BufferedImage; /** + * An EventGraphic specifies the image to be displayed on the map for an Event. * * @author hatkirby */ 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 f8f9719..0002c03 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/CustomMovementType.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/CustomMovementType.java @@ -8,6 +8,9 @@ package com.fourisland.fourpuzzle.gamestate.mapview.event.movement; import com.fourisland.fourpuzzle.Direction; /** + * CustomMovementEvent takes an array of Directions and directions the event + * to move in each of them, one by one, returning to the top of the list when + * done. * * @author hatkirby */ 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 7beba85..f304ec0 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/MovementType.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/MovementType.java @@ -8,6 +8,10 @@ package com.fourisland.fourpuzzle.gamestate.mapview.event.movement; import com.fourisland.fourpuzzle.Direction; /** + * A MovementType is an object that specifies the type of AI a non-hero event + * will have. Every tick when said event is not moving, MovementType's + * nextMovement() function will be invoked which should return the next + * direction for the event to move into. * * @author hatkirby */ 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 df93c6f..fd65a41 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/RandomMovementType.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/RandomMovementType.java @@ -9,6 +9,7 @@ import com.fourisland.fourpuzzle.Direction; import java.util.Random; /** + * RandomMovementType moves the event in random directions. * * @author hatkirby */ 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 2526f0f..e373de9 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/StayStillMovementType.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/StayStillMovementType.java @@ -8,6 +8,7 @@ package com.fourisland.fourpuzzle.gamestate.mapview.event.movement; import com.fourisland.fourpuzzle.Direction; /** + * StayStillMovementType keeps the event stationary. * * @author hatkirby */ diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/HeroInPartyPrecondition.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/HeroInPartyPrecondition.java index 0c0af20..b25562b 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/HeroInPartyPrecondition.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/HeroInPartyPrecondition.java @@ -8,6 +8,8 @@ package com.fourisland.fourpuzzle.gamestate.mapview.event.precondition; import com.fourisland.fourpuzzle.Game; /** + * HeroInPartyPrecondition checks to see if a specific character is in the + * party. * * @author hatkirby */ diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/HeroLevelPrecondition.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/HeroLevelPrecondition.java deleted file mode 100644 index ae8183d..0000000 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/HeroLevelPrecondition.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -package com.fourisland.fourpuzzle.gamestate.mapview.event.precondition; - -import com.fourisland.fourpuzzle.Game; - -/** - * - * @author hatkirby - */ -public class HeroLevelPrecondition implements Precondition { - - private String heroName; - private int level; - - public HeroLevelPrecondition(String heroName, int level) - { - this.heroName = heroName; - this.level = level; - } - - public boolean match() - { - return (Game.getSaveFile().getParty().exists(heroName) && (Game.getSaveFile().getParty().get(heroName).getLevel() == level)); - } - -} diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/Precondition.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/Precondition.java index b275100..46cdcd2 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/Precondition.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/Precondition.java @@ -6,6 +6,12 @@ package com.fourisland.fourpuzzle.gamestate.mapview.event.precondition; /** + * A Precondition is an object that helps LayerEvent to determine which + * of its (possibly many) PossibleEvents is active. PossibleEvents can + * have Preconditions attached to them and when all Preconditions are fulfilled + * (determined by the true return value from match()) and + * there are not fulfilled PossibleEvents later in the queue, said PossibleEvent + * will be active. * * @author hatkirby */ diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/SwitchPrecondition.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/SwitchPrecondition.java index 7bccadf..9ea6c16 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/SwitchPrecondition.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/SwitchPrecondition.java @@ -8,6 +8,7 @@ package com.fourisland.fourpuzzle.gamestate.mapview.event.precondition; import com.fourisland.fourpuzzle.Game; /** + * SwitchPrecondition checks to see if a certain Switch is ON. * * @author hatkirby */ diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableNumberPrecondition.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableNumberPrecondition.java index afedadd..ab8d977 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableNumberPrecondition.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableNumberPrecondition.java @@ -9,6 +9,8 @@ import com.fourisland.fourpuzzle.util.Comparison; import com.fourisland.fourpuzzle.Game; /** + * VariableNumberPrecondition compares a the value of a variable and a number + * together with a specified Comparison. * * @author hatkirby */ diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableVariablePrecondition.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableVariablePrecondition.java index dbdf019..91a31ba 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableVariablePrecondition.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableVariablePrecondition.java @@ -9,6 +9,8 @@ import com.fourisland.fourpuzzle.util.Comparison; import com.fourisland.fourpuzzle.Game; /** + * VariableVariablePrecondition compares two variables together with a specified + * Comparison. * * @author hatkirby */ diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/FaceMoveEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/FaceMoveEvent.java index fcc0a7a..3ed545b 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/FaceMoveEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/FaceMoveEvent.java @@ -9,7 +9,8 @@ import com.fourisland.fourpuzzle.Direction; import com.fourisland.fourpuzzle.gamestate.mapview.event.Event; /** - * + * FaceMoveEvent turns the selected Event in the chosen direction. + * * @author hatkirby */ public class FaceMoveEvent implements MoveEvent { diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/LoopUntilCollisionMoveEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/LoopUntilCollisionMoveEvent.java index 4c9eb6e..02744d0 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/LoopUntilCollisionMoveEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/LoopUntilCollisionMoveEvent.java @@ -9,7 +9,12 @@ import com.fourisland.fourpuzzle.gamestate.mapview.event.Event; import java.awt.Point; /** - * + * LoopUntilCollisionMoveEvent takes an array of MoveEvents and repeatedly + * executes them until the event in question collides into something. This is + * done by comparing the location of the event before and after the MoveEvents execute. + * Because of this, MoveEvent arrays that do not move the event will not block the + * game. + * * @author hatkirby */ public class LoopUntilCollisionMoveEvent implements MoveEvent { diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/MoveEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/MoveEvent.java index 1d64d9e..b79c45a 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/MoveEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/MoveEvent.java @@ -9,7 +9,9 @@ package com.fourisland.fourpuzzle.gamestate.mapview.event.specialmove; import com.fourisland.fourpuzzle.gamestate.mapview.event.Event; /** - * + * A MoveEvent is an object that tells the MoveEvent() SpecialEvent + * what to do. + * * @author hatkirby */ public interface MoveEvent { diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/StepMoveEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/StepMoveEvent.java index 2f55816..d5d830e 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/StepMoveEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/StepMoveEvent.java @@ -11,6 +11,7 @@ import java.util.logging.Level; import java.util.logging.Logger; /** + * StepMoveEvent moves the event in the direction specified. * * @author hatkirby */ diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/WaitMoveEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/WaitMoveEvent.java index 1464bcd..eb56b95 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/WaitMoveEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/WaitMoveEvent.java @@ -10,7 +10,8 @@ import java.util.logging.Level; import java.util.logging.Logger; /** - * + * WaitMoveEvent pauses for the specifed amount of milliseconds. + * * @author hatkirby */ public class WaitMoveEvent implements MoveEvent { -- cgit 1.4.1