From dfd0d826856b745e3e40b48a3644cf1e7cf1400a Mon Sep 17 00:00:00 2001 From: Jocelyn Hebert Date: Fri, 17 Jul 2026 14:38:49 -0300 Subject: [PATCH] Created a full logic, trying to follow OOP principles. --- Lingo/PlayGame.cs | 29 ++++++++++++++++++++--------- Lingo/SpectreView.cs | 6 ++++++ Lingo/WordCorrect.cs | 6 ++++++ Lingo/WordValidation.cs | 6 ++++++ Lingo/WordVerification.cs | 6 ++++++ 5 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 Lingo/SpectreView.cs create mode 100644 Lingo/WordCorrect.cs create mode 100644 Lingo/WordValidation.cs create mode 100644 Lingo/WordVerification.cs diff --git a/Lingo/PlayGame.cs b/Lingo/PlayGame.cs index 8032747..079b14f 100644 --- a/Lingo/PlayGame.cs +++ b/Lingo/PlayGame.cs @@ -4,17 +4,28 @@ using Spectre.Console; public class PlayGame { + public string CurrentAnswer { get; private set; } + public string CurrentBoard { get; private set; } + + string Solution = ChooseWord(); + public void Attempt() + { + AnsiConsole.MarkupLine($"[white on black]Enter your guess[/]"); + + CurrentAnswer = Console.ReadLine().Trim(); + + WordCorrect(CurrentAnswer); + + string ToAddToBoard = WordValidation(Solution, CurrentAnswer); + + CurrentBoard = CurrentBoard + ToAddToBoard(CurrentAnswer); + + + } + public PlayGame() { - GameData game = new GameData(); - while (game.GamePlaying) - { - AnsiConsole.MarkupLine($"[white on black]Enter your guess[/]"); - - public string CurrentBoard = $"[white on black]Enter your guess[/]\n"; - - - } + GameData game = new GameData(); } diff --git a/Lingo/SpectreView.cs b/Lingo/SpectreView.cs new file mode 100644 index 0000000..1749b2b --- /dev/null +++ b/Lingo/SpectreView.cs @@ -0,0 +1,6 @@ +namespace Lingo; + +public class SpectreView +{ + +} \ No newline at end of file diff --git a/Lingo/WordCorrect.cs b/Lingo/WordCorrect.cs new file mode 100644 index 0000000..73341f3 --- /dev/null +++ b/Lingo/WordCorrect.cs @@ -0,0 +1,6 @@ +namespace Lingo; + +public class WordCorrect +{ + +} \ No newline at end of file diff --git a/Lingo/WordValidation.cs b/Lingo/WordValidation.cs new file mode 100644 index 0000000..67c2c09 --- /dev/null +++ b/Lingo/WordValidation.cs @@ -0,0 +1,6 @@ +namespace Lingo; + +public class WordValidation +{ + +} \ No newline at end of file diff --git a/Lingo/WordVerification.cs b/Lingo/WordVerification.cs new file mode 100644 index 0000000..7de8eeb --- /dev/null +++ b/Lingo/WordVerification.cs @@ -0,0 +1,6 @@ +namespace Lingo; + +public class WordVerification +{ + +} \ No newline at end of file