Move code into own package

This commit is contained in:
Arne Keller 2020-03-08 20:26:32 +01:00
parent 4fa7bf047b
commit 5e3e3b4bad
44 changed files with 173 additions and 172 deletions

View File

@ -1,6 +1,6 @@
package edu.kit.informatik;
package edu.kit.informatik.modelrailwaysimulator;
import edu.kit.informatik.ui.CommandLine;
import edu.kit.informatik.modelrailwaysimulator.ui.CommandLine;
/**
* The main class.

View File

@ -1,5 +1,6 @@
package edu.kit.informatik;
package edu.kit.informatik.modelrailwaysimulator;
import edu.kit.informatik.Terminal;
import org.junit.jupiter.api.Test;
import java.io.*;

View File

@ -1,10 +1,10 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.regex.Pattern;
import static edu.kit.informatik.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.NUMBER;
/**
* A coach.

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
/**
* Diesel engine.

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
/**
* Electrical engine.

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
/**
* Generic engine, is usually either diesel, steam or electric.

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
/**
* A freight coach.

View File

@ -1,7 +1,7 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.CoachType;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.CoachType;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.ArrayList;
import java.util.Comparator;

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
/**
* A passenger coach.

View File

@ -1,4 +1,4 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
/**
* Generic rail that other rails can connect to.

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.HashMap;
import java.util.HashSet;

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
/**
* A rolling stock with a specific integer length and couplings. Is usually an engine, train set or coach.

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
/**
* A special coach, used for e.g. firefighting.

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
/**
* Steam engine.

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.Objects;

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.Objects;

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.ArrayList;
import java.util.HashSet;

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.ArrayList;
import java.util.Collections;

View File

@ -1,6 +1,6 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
/**
* Train set.

View File

@ -1,4 +1,4 @@
package edu.kit.informatik.model;
package edu.kit.informatik.modelrailwaysimulator.model;
import java.util.Objects;

View File

@ -1,9 +1,9 @@
package edu.kit.informatik.ui;
package edu.kit.informatik.modelrailwaysimulator.ui;
import edu.kit.informatik.model.Coach;
import edu.kit.informatik.model.FreightCoach;
import edu.kit.informatik.model.PassengerCoach;
import edu.kit.informatik.model.SpecialCoach;
import edu.kit.informatik.modelrailwaysimulator.model.Coach;
import edu.kit.informatik.modelrailwaysimulator.model.FreightCoach;
import edu.kit.informatik.modelrailwaysimulator.model.PassengerCoach;
import edu.kit.informatik.modelrailwaysimulator.model.SpecialCoach;
/**
* Type of a coach.

View File

@ -1,8 +1,8 @@
package edu.kit.informatik.ui;
package edu.kit.informatik.modelrailwaysimulator.ui;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.ui.command.CommandFactory;
import edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory;
/**
* Interactive simulation runner: gets user inputs and processes specified commands.

View File

@ -1,9 +1,9 @@
package edu.kit.informatik.ui;
package edu.kit.informatik.modelrailwaysimulator.ui;
import edu.kit.informatik.model.DieselEngine;
import edu.kit.informatik.model.ElectricalEngine;
import edu.kit.informatik.model.Engine;
import edu.kit.informatik.model.SteamEngine;
import edu.kit.informatik.modelrailwaysimulator.model.DieselEngine;
import edu.kit.informatik.modelrailwaysimulator.model.ElectricalEngine;
import edu.kit.informatik.modelrailwaysimulator.model.Engine;
import edu.kit.informatik.modelrailwaysimulator.model.SteamEngine;
/**
* Type of locomotive. Can be either diesel, steam or electrical.

View File

@ -1,4 +1,4 @@
package edu.kit.informatik.ui;
package edu.kit.informatik.modelrailwaysimulator.ui;
/**
* Thrown on invalid user input.

View File

@ -1,15 +1,15 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.model.Vector2D;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.model.Vector2D;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static edu.kit.informatik.ui.command.CommandFactory.ADD_SWITCH;
import static edu.kit.informatik.ui.command.CommandFactory.VECTOR;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.ADD_SWITCH;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.VECTOR;
/**
* Command used to add a switch to the rail network.

View File

@ -1,15 +1,15 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.model.Vector2D;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.model.Vector2D;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static edu.kit.informatik.ui.command.CommandFactory.ADD_TRACK;
import static edu.kit.informatik.ui.command.CommandFactory.VECTOR;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.ADD_TRACK;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.VECTOR;
/**
* Command used to add a track to the rail network.

View File

@ -1,16 +1,16 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.model.RollingStock;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.model.RollingStock;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static edu.kit.informatik.ui.command.CommandFactory.ADD_TRAIN;
import static edu.kit.informatik.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.ui.command.CommandFactory.ROLLING_STOCK_IDENTIFIER;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.ADD_TRAIN;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.ROLLING_STOCK_IDENTIFIER;
/**
* Command used to construct a new train or modify an existing train.

View File

@ -1,7 +1,7 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
/**
* Command that can be applied to a simulation.

View File

@ -1,7 +1,7 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.model.Coach;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.model.Coach;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.HashMap;
import java.util.Map;

View File

@ -1,17 +1,17 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.ui.CoachType;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.ui.CoachType;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static edu.kit.informatik.ui.CoachType.COACH_TYPE;
import static edu.kit.informatik.ui.command.CommandFactory.BOOL;
import static edu.kit.informatik.ui.command.CommandFactory.CREATE_COACH;
import static edu.kit.informatik.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.modelrailwaysimulator.ui.CoachType.COACH_TYPE;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.BOOL;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.CREATE_COACH;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.NUMBER;
/**
* Command used to create a single coach.

View File

@ -1,20 +1,20 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.model.Coach;
import edu.kit.informatik.model.Engine;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.ui.EngineType;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.model.Coach;
import edu.kit.informatik.modelrailwaysimulator.model.Engine;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.ui.EngineType;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static edu.kit.informatik.ui.EngineType.ENGINE_TYPE;
import static edu.kit.informatik.ui.command.CommandFactory.ALPHANUMERIC_WORD;
import static edu.kit.informatik.ui.command.CommandFactory.BOOL;
import static edu.kit.informatik.ui.command.CommandFactory.CREATE_ENGINE;
import static edu.kit.informatik.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.modelrailwaysimulator.ui.EngineType.ENGINE_TYPE;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.ALPHANUMERIC_WORD;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.BOOL;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.CREATE_ENGINE;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.NUMBER;
/**
* Command used to create a single engine.

View File

@ -1,18 +1,18 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.model.Coach;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.model.Coach;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.model.TrainSet;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.model.TrainSet;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static edu.kit.informatik.ui.command.CommandFactory.ALPHANUMERIC_WORD;
import static edu.kit.informatik.ui.command.CommandFactory.BOOL;
import static edu.kit.informatik.ui.command.CommandFactory.CREATE_TRAIN_SET;
import static edu.kit.informatik.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.ALPHANUMERIC_WORD;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.BOOL;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.CREATE_TRAIN_SET;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.NUMBER;
/**
* Command used to add a new train set.

View File

@ -1,15 +1,15 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static edu.kit.informatik.ui.CommandLine.OK;
import static edu.kit.informatik.ui.command.CommandFactory.DELETE_ROLLING_STOCK;
import static edu.kit.informatik.ui.command.CommandFactory.ROLLING_STOCK_IDENTIFIER;
import static edu.kit.informatik.modelrailwaysimulator.ui.CommandLine.OK;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.DELETE_ROLLING_STOCK;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.ROLLING_STOCK_IDENTIFIER;
/**
* Command used to delete rolling stock.

View File

@ -1,12 +1,12 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import static edu.kit.informatik.ui.CommandLine.OK;
import static edu.kit.informatik.ui.command.CommandFactory.DELETE_TRACK;
import static edu.kit.informatik.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.modelrailwaysimulator.ui.CommandLine.OK;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.DELETE_TRACK;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.NUMBER;
/**
* Command used to delete a track or switch.

View File

@ -1,12 +1,12 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import static edu.kit.informatik.ui.CommandLine.OK;
import static edu.kit.informatik.ui.command.CommandFactory.DELETE_TRAIN;
import static edu.kit.informatik.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.modelrailwaysimulator.ui.CommandLine.OK;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.DELETE_TRAIN;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.NUMBER;
/**
* Command used to delete a train, without deleting rolling stock of the train.

View File

@ -1,12 +1,12 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.List;
import static edu.kit.informatik.ui.command.CommandFactory.LIST_COACHES;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.LIST_COACHES;
/**
* Command used to print a list of coaches.

View File

@ -1,12 +1,12 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.List;
import static edu.kit.informatik.ui.command.CommandFactory.LIST_ENGINES;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.LIST_ENGINES;
/**
* Command used to print a list of engines.

View File

@ -1,12 +1,12 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.List;
import static edu.kit.informatik.ui.command.CommandFactory.LIST_TRACKS;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.LIST_TRACKS;
/**
* Command used to print a list of tracks and switches.

View File

@ -1,12 +1,12 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.List;
import static edu.kit.informatik.ui.command.CommandFactory.LIST_TRAIN_SETS;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.LIST_TRAIN_SETS;
/**
* Command used to print a list of train sets on the terminal.

View File

@ -1,12 +1,12 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.SortedMap;
import static edu.kit.informatik.ui.command.CommandFactory.LIST_TRAINS;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.LIST_TRAINS;
/**
* Command used to print a list of trains on the terminal.

View File

@ -1,17 +1,17 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.model.Vector2D;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.model.Vector2D;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static edu.kit.informatik.ui.CommandLine.OK;
import static edu.kit.informatik.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.ui.command.CommandFactory.PUT_TRAIN;
import static edu.kit.informatik.ui.command.CommandFactory.VECTOR;
import static edu.kit.informatik.modelrailwaysimulator.ui.CommandLine.OK;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.PUT_TRAIN;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.VECTOR;
/**
* Command used to put a train on the rail network.

View File

@ -1,17 +1,17 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.model.Vector2D;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.model.Vector2D;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static edu.kit.informatik.ui.CommandLine.OK;
import static edu.kit.informatik.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.ui.command.CommandFactory.SET_SWITCH;
import static edu.kit.informatik.ui.command.CommandFactory.VECTOR;
import static edu.kit.informatik.modelrailwaysimulator.ui.CommandLine.OK;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.SET_SWITCH;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.VECTOR;
/**
* Command used to specify the position a switch is set to.

View File

@ -1,11 +1,11 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import static edu.kit.informatik.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.ui.command.CommandFactory.SHOW_TRAIN;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.SHOW_TRAIN;
/**
* Command used to print a train as ASCII art.

View File

@ -1,17 +1,17 @@
package edu.kit.informatik.ui.command;
package edu.kit.informatik.modelrailwaysimulator.ui.command;
import edu.kit.informatik.Terminal;
import edu.kit.informatik.model.ModelRailwaySimulation;
import edu.kit.informatik.model.Vector2D;
import edu.kit.informatik.ui.InvalidInputException;
import edu.kit.informatik.modelrailwaysimulator.model.ModelRailwaySimulation;
import edu.kit.informatik.modelrailwaysimulator.model.Vector2D;
import edu.kit.informatik.modelrailwaysimulator.ui.InvalidInputException;
import java.util.List;
import java.util.Optional;
import java.util.SortedSet;
import static edu.kit.informatik.ui.CommandLine.OK;
import static edu.kit.informatik.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.ui.command.CommandFactory.STEP;
import static edu.kit.informatik.modelrailwaysimulator.ui.CommandLine.OK;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.NUMBER;
import static edu.kit.informatik.modelrailwaysimulator.ui.command.CommandFactory.STEP;
/**
* Command used to advance the simulation.