refactor: unify comment styles
feat: add entity list class
This commit is contained in:
@ -7,11 +7,11 @@ import uulm.teamname.marvelous.gamelibrary.requests.Request;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
/** Contains game logic handling.
|
||||
*/
|
||||
/** Contains game logic handling. */
|
||||
class GameLogic {
|
||||
/** Produces resulting {@link Event}s from a given {@link Request} independently of any {@link GameState}.
|
||||
* @return The list of resulting events.
|
||||
/**
|
||||
* Produces resulting {@link Event}s from a given {@link Request} independently of any {@link GameState}.
|
||||
* @return The list of resulting events
|
||||
*/
|
||||
public static ArrayList<Event> executeRequest(Request request) {
|
||||
ArrayList<Event> result = new ArrayList<Event>();
|
||||
@ -30,9 +30,10 @@ class GameLogic {
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Checks a {@link Request} for validity for a {@link GameState}.
|
||||
* @param state The game state to check on.
|
||||
* @param request The request to validate.
|
||||
/**
|
||||
* Checks a {@link Request} for validity for a {@link GameState}.
|
||||
* @param state The game state to check on
|
||||
* @param request The request to validate
|
||||
* @return Whether or not the request is valid
|
||||
*/
|
||||
public static boolean checkRequest(GameState state, Request request) {
|
||||
@ -40,17 +41,19 @@ class GameLogic {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Applies an {@link Event} to a {@link GameState}.
|
||||
* @param state The game state to apply to.
|
||||
* @param event The event to apply.
|
||||
/**
|
||||
* Applies an {@link Event} to a {@link GameState}.
|
||||
* @param state The game state to apply to
|
||||
* @param event The event to apply
|
||||
*/
|
||||
public static void applyEvent(GameState state, Event event) {
|
||||
//TODO: implement GameLogic.applyEvent
|
||||
}
|
||||
|
||||
/** Checks a {@link GameState} for the current overtime win condition.
|
||||
* @param state The game state to check.
|
||||
* @return The {@link ParticipantType} that is currently winning the game according to overtime ruling.
|
||||
/**
|
||||
* Checks a {@link GameState} for the current overtime win condition.
|
||||
* @param state The game state to check
|
||||
* @return The {@link ParticipantType} that is currently winning the game according to overtime ruling
|
||||
*/
|
||||
public static ParticipantType checkWinConditions(GameState state) {
|
||||
//TODO: GameLogic.checkWinConditions is kind of ugly
|
||||
|
Reference in New Issue
Block a user