diff --git a/Projektgruppe_175/src/game/Goal.java b/Projektgruppe_175/src/game/Goal.java index c6ad2dc..2ff6af3 100644 --- a/Projektgruppe_175/src/game/Goal.java +++ b/Projektgruppe_175/src/game/Goal.java @@ -6,27 +6,65 @@ public abstract class Goal { private final String description; private final String name; + /** + * Constructs a new goal/mission + * @param name Quick name + * @param description Description for the goal + */ public Goal(String name, String description) { this.name = name; this.description = description; } + /** + * Set the current game + * @param game The game + */ public void setGame(Game game) { this.game = game; } + /** + * Returns whether the goal/mission is completed + * @return True if the mission is complete, false + * otherwise + */ public abstract boolean isCompleted(); + + /** + * Returns the winner of the game or null + * if there is no winner (yet) + * @return A Player object or null + */ public abstract Player getWinner(); + + /** + * Returns whether a player has lost + * @param player The player + * @return True if the player has lost + */ public abstract boolean hasLost(Player player); - public final String getDescription() { + /** + * Gets the description of the mission + * @return The description + */ + public final String getDescription() { return this.description; } + /** + * Gets the name of the mission + * @return The name + */ public final String getName() { return this.name; } + /** + * Gets the game attached to this mission + * @return The game + */ protected Game getGame() { return this.game; } diff --git a/Projektgruppe_175/src/game/goals/CaptureTheFlagGoal.java b/Projektgruppe_175/src/game/goals/CaptureTheFlagGoal.java new file mode 100644 index 0000000..fa216ca --- /dev/null +++ b/Projektgruppe_175/src/game/goals/CaptureTheFlagGoal.java @@ -0,0 +1,31 @@ +package game.goals; + +import game.Goal; +import game.Player; + +public class CaptureTheFlagGoal extends Goal { + + public CaptureTheFlagGoal() { + // TODO Auto-generated constructor stub + super("Capture the flag", ""); + } + + @Override + public boolean isCompleted() { + // TODO Auto-generated method stub + return false; + } + + @Override + public Player getWinner() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean hasLost(Player player) { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/doc/Dokumentation.tex b/doc/Dokumentation.tex index 36a8774..1453dce 100644 --- a/doc/Dokumentation.tex +++ b/doc/Dokumentation.tex @@ -192,5 +192,13 @@ Für alle noch nicht abgearbeiteten Knoten gilt: Für alle abgearbeiteten Knoten gilt: \subsection{Kürzester Pfad zu allen Knoten} - + +\section{Weitergestaltung des Spiels} + +\subsection{Computergegner} + +\subsection{Missionen} + +\subsection{Joker} + \end{document}