Changed accessibility modifiers in light of new structure.

This commit is contained in:
Harrison Deng 2020-02-23 16:21:23 -05:00
parent 48cf2b80ca
commit de68e62eb4
4 changed files with 11 additions and 5 deletions

View File

@ -4,7 +4,7 @@ using System.Text;
namespace RecrownedGTK.Tools.CommandProcessor namespace RecrownedGTK.Tools.CommandProcessor
{ {
internal class CommandEngine public class CommandEngine
{ {
public bool running = true; public bool running = true;
public readonly List<EngineCommand> commands; public readonly List<EngineCommand> commands;
@ -14,12 +14,12 @@ namespace RecrownedGTK.Tools.CommandProcessor
commands = new List<EngineCommand>(); commands = new List<EngineCommand>();
} }
internal void Run() public void Run(IUserInput input)
{ {
while (running) while (running)
{ {
ConsoleUtilities.WriteWrappedLine("\nAwaiting command."); ConsoleUtilities.WriteWrappedLine("\nAwaiting command.");
string command = Console.ReadLine(); string command = input.GetInput();
try try
{ {
Process(command); Process(command);

View File

@ -2,7 +2,7 @@
namespace RecrownedGTK.Tools.CommandProcessor.Commands namespace RecrownedGTK.Tools.CommandProcessor.Commands
{ {
internal class ClearConsoleCommand : EngineCommand public class ClearConsoleCommand : EngineCommand
{ {
public ClearConsoleCommand() : base("clear") public ClearConsoleCommand() : base("clear")
{ {

View File

@ -2,7 +2,7 @@
namespace RecrownedGTK.Tools.CommandProcessor.Commands namespace RecrownedGTK.Tools.CommandProcessor.Commands
{ {
internal class HelpCommand : EngineCommand public class HelpCommand : EngineCommand
{ {
CommandEngine commandEngine; CommandEngine commandEngine;

View File

@ -0,0 +1,6 @@
namespace RecrownedGTK.Tools.CommandProcessor {
public interface IUserInput
{
string GetInput();
}
}