package edu.kit.informatik.model; /** * Steam engine. * * @author Arne Keller * @version 1.0 */ public class SteamEngine extends Engine { /** * ASCII art representation of a steam engine. */ private static final String[] STEAM_ENGINE_TEXT = new String[] { " ++ +------", " || |+-+ | ", " /---------|| | | ", " + ======== +-+ | ", " _|--/~\\------/~\\-+ ", "//// \\_/ \\_/ " }; /** * Construct a new steam engine. * @param series series/class of engine * @param name name of engine * @param length length of engine * @param couplingFront whether the engine should have a front coupling * @param couplingBack whether the engine should have a back coupling */ public SteamEngine(final String series, final String name, final int length, final boolean couplingFront, final boolean couplingBack) { super(series, name, length, couplingFront, couplingBack); } @Override public String toString() { return String.format("s %s %s %d %b %b", getSeries(), getName(), getLength(), hasCouplingFront(), hasCouplingBack()); } @Override public String[] textRepresentation() { return STEAM_ENGINE_TEXT; } @Override public String description() { return "steam engine"; } }