merge: merged comment in EventBuilder for better formating
Conflicts: src/main/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilder.java
This commit is contained in:
		@ -45,7 +45,6 @@ public class EntityID {
 | 
			
		||||
        return "["+type.toString()+":"+id+"]";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean equals(Object o) {
 | 
			
		||||
        if (this == o) return true;
 | 
			
		||||
 | 
			
		||||
@ -8,13 +8,10 @@ import uulm.teamname.marvelous.gamelibrary.entities.StoneType;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A class made for building all sorts of {@link Event}s as nicely as possible. It works by taking
 | 
			
		||||
 * .with[KEY]() functions and then building a specific event at the end
 | 
			
		||||
 * A class made for building all sorts of {@link Event}s as nicely as possible.
 | 
			
		||||
 * It works by taking .with[KEY]() functions and then building a specific event at the end.
 | 
			
		||||
 */
 | 
			
		||||
public class EventBuilder {
 | 
			
		||||
 | 
			
		||||
    // variable definitions (as in all possible keys)
 | 
			
		||||
    /** The type of event that is being built */
 | 
			
		||||
    private EventType type;
 | 
			
		||||
 | 
			
		||||
    // Keys used primarily in EntityEvents, but also in others
 | 
			
		||||
@ -39,7 +36,7 @@ public class EventBuilder {
 | 
			
		||||
    private String message;
 | 
			
		||||
    private Integer timeLeft;
 | 
			
		||||
 | 
			
		||||
    // Keys used primarily in GamestateEvents
 | 
			
		||||
    // Keys used primarily in GameStateEvents
 | 
			
		||||
    private Entity[] entities;
 | 
			
		||||
    private EntityID[] turnOrder;
 | 
			
		||||
    private EntityID activeCharacter;
 | 
			
		||||
@ -50,14 +47,13 @@ public class EventBuilder {
 | 
			
		||||
    private HashMap<String, Object> customContent;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Creates an empty {@link EventBuilder} used for building {@link Event}s
 | 
			
		||||
     * Creates a new {@link EventBuilder} used for building {@link Event}s
 | 
			
		||||
     */
 | 
			
		||||
    public EventBuilder () {
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    // With <something> for builder pattern style things
 | 
			
		||||
    // with<something> for builder pattern style things
 | 
			
		||||
 | 
			
		||||
    public EventBuilder withType(EventType type) {
 | 
			
		||||
        this.type = type;
 | 
			
		||||
@ -195,12 +191,12 @@ public class EventBuilder {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Builds a generic {@link EntityEvent} from the values given to the builder.
 | 
			
		||||
     *  <ul>
 | 
			
		||||
     *   <li>type is the {@link EventType} of the EntityEvent</li>
 | 
			
		||||
     *   <li>targetEntity is the target {@link Entity}</li>
 | 
			
		||||
     *   <li>targetField is the target field in the form of an {@link IntVector2}</li>
 | 
			
		||||
     *   <li>amount is the amount of something, like damage. It's an int.</li>
 | 
			
		||||
     * Builds an {@link EntityEvent} from the values given to the builder.
 | 
			
		||||
     * <ul>
 | 
			
		||||
     *  <li>type is the {@link EventType} of the EntityEvent</li>
 | 
			
		||||
     *  <li>targetEntity is the target {@link Entity}</li>
 | 
			
		||||
     *  <li>targetField is the target field in the form of an {@link IntVector2}</li>
 | 
			
		||||
     *  <li>amount is the amount of something, like damage. It's an int.</li>
 | 
			
		||||
     * </ul>
 | 
			
		||||
     * @return a {@link EntityEvent} based on the builder. Caution: non-given fields are null!
 | 
			
		||||
     */
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user