/// /// The Clear command is used to clear the players terminal screen of all text. /// public class CommandClear : IGameCommand { /// /// Used by the Command Engine to allow for overriding any other commands that contain the same name. /// TODO: Does Overriding Commands still work? This is part of some old code I wrote several years back and might be broke. /// public Boolean Override { get; set; } /// /// The name of the command. /// If Override is set to true, this command will override any other command that contains the same name. /// public String Name { get; set; } /// /// A collection of strings that contains helpfull information for this Command. /// When the user enteres 'Help Exit' the game will print the content of this collection. /// This is treated like a virtual book, each entry in the collection is printed as a new line. /// public List Help { get; set; } /// /// Constructor for the class. /// public CommandClear() { Help = new List(); Help.Add("The Clear command is used to clear the screen of all text."); } /// /// Constructor for the class. /// public void Execute(String command, BaseCharacter player) { //Call the flush method to clear the players console screen of all text. player.FlushConsole(); } }