GG EZ, ima go piss
This commit is contained in:
27
TermEngine/HelpCommand.cs
Normal file
27
TermEngine/HelpCommand.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
public class HelpCommand : ICommand
|
||||
{
|
||||
private readonly CommandInterpreter _interpreter;
|
||||
|
||||
public HelpCommand(CommandInterpreter interpreter)
|
||||
{
|
||||
|
||||
_interpreter = interpreter;
|
||||
|
||||
}
|
||||
public string Name => "help";
|
||||
public String Description => "Shows the Help pop Up";
|
||||
|
||||
public void Execute(string[] args)
|
||||
{
|
||||
Console.WriteLine("Avaliable Commands:");
|
||||
foreach (var cmd in _interpreter.GetAllCommands())
|
||||
{
|
||||
|
||||
Console.WriteLine($"Command : {cmd.Name} | {cmd.Description}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user