From 0f7d9022c4b23c4c0d0613342786fdf4efb1c8ea Mon Sep 17 00:00:00 2001 From: Jocelyn Date: Sun, 2 Aug 2026 15:24:27 -0300 Subject: [PATCH] Added the Game Loop --- Lingo/GameLoop.cs | 24 ++++++++++++++++++++++++ Lingo/Setup.cs | 6 +++--- 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 Lingo/GameLoop.cs diff --git a/Lingo/GameLoop.cs b/Lingo/GameLoop.cs new file mode 100644 index 0000000..8aa32fc --- /dev/null +++ b/Lingo/GameLoop.cs @@ -0,0 +1,24 @@ +namespace Lingo; + +public class GameLoop +{ + public string SelectedWord { + get + { + return Setup.wordSelector(); + } + private set; + } + public string InputWord { + get + { + return Setup.inputWord(); + } + private set; + } + + public GameLoop() + { + + } +} \ No newline at end of file diff --git a/Lingo/Setup.cs b/Lingo/Setup.cs index 187544b..6757b27 100644 --- a/Lingo/Setup.cs +++ b/Lingo/Setup.cs @@ -4,15 +4,15 @@ public static class Setup { static Random rnd = new Random(); static string[] words = File.ReadAllLines("words.txt"); - - static string wordSelector() + + public static string wordSelector() { int rand = rnd.Next(0, words.Length); string selectedWord = words[rand]; return selectedWord; } - static string inputWord() + public static string inputWord() { string inputWord = Console.ReadLine(); return inputWord;