diff options
Diffstat (limited to 'Scripts/Game.cs')
| -rw-r--r-- | Scripts/Game.cs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/Scripts/Game.cs b/Scripts/Game.cs deleted file mode 100644 index 07dab9a..0000000 --- a/Scripts/Game.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Diagnostics; -using Godot; - -namespace Texty.Scripts -{ - public abstract class Game : MarginContainer - { - public CommandParser CommandParser; - public VBoxContainer LayoutContainer; - public OutputContainer OutputContainer; - - [Export(PropertyHint.File, "*.tscn")] public PackedScene OutputRowScene; - - public override void _Ready() - { - Debug.Assert(OutputRowScene != null, $"The {nameof(OutputRowScene)} was not set!"); - - CommandParser = GetNode<CommandParser>(nameof(CommandParser)); - LayoutContainer = GetNode<VBoxContainer>(nameof(LayoutContainer)); - OutputContainer = LayoutContainer.GetNode<OutputContainer>(nameof(OutputContainer)); - } - - public void OnInputSubmitted(string text) - { - var newRow = OutputRowScene.Instance<OutputRow>(); - newRow.InputText = text; - - var command = CommandParser.TryParse(text); - newRow.OutputText = command == null ? "Please rephrase your command" : "THE OUTPUT SHOULD GO HERE!"; - - OutputContainer.Add(newRow); - } - } -}
\ No newline at end of file |
