private void StoreCommand(CommandLineType commandType, string[] commandLineItems, string commandLine) { switch (commandType) { case CommandLineType.zoneDimensions: this.TerrainZone = new TerrainZone(commandLineItems, commandLine); break; case CommandLineType.startingLocation: this.Rover = new Rover(commandLineItems, TerrainZone); break; case CommandLineType.movementCommands: this.Rover.MovementCommands = commandLine.ToCharArray(); break; default: break; } }
/// <summary> /// Wants / Has parameter /// </summary> public static bool WantsValue(this CommandLineType kind) { return(kind != CommandLineType.None); }