@@ -0,0 +1,1521 @@
+package com.google.research.bleth.simulator;%0A%0A/**%0A * A class for generating movement strategies based on strategy type provided.%0A * The factory gets as an argument the specific type of strategy to generate.%0A */%0Apublic class MovementStrategyFactory %7B%0A%0A    public enum Type %7B%0A        STATIONARY(false), RANDOM(false), UP(true);%0A%0A        private final boolean isTestOnly;%0A%0A        Type(boolean isTestOnly) %7B this.isTestOnly = isTestOnly; %7D%0A%0A        public boolean isTestOnly() %7B return isTestOnly; %7D%0A    %7D%0A%0A    private Type type;%0A%0A    /**%0A     * Create new MovementStrategyFactory.%0A     * @param type is the type of the movement strategies generated using the created factory.%0A     */%0A    public MovementStrategyFactory(Type type) %7B%0A        this.type = type;%0A    %7D%0A%0A    /**%0A     * Create a new strategy according to the factory's type attribute.%0A     * @return a movement strategy (if no proper type was set, return random by default).%0A     */%0A    public IMovementStrategy createStrategy() %7B%0A        switch (this.type) %7B%0A            case STATIONARY: return createStationaryStrategy();%0A            case UP: return createUpStrategy();%0A            default: return createRandomStrategy();%0A        %7D%0A    %7D%0A%0A    private IMovementStrategy createStationaryStrategy() %7B%0A        return new StationaryMovementStrategy();%0A    %7D%0A%0A    private IMovementStrategy createUpStrategy() %7B%0A        return new UpMovementStrategy();%0A    %7D%0A%0A    private IMovementStrategy createRandomStrategy() %7B%0A        return new RandomMovementStrategy();%0A    %7D%0A%7D%0A

implement movement strategy factory and movement strategy type as enum.