From 38500aebfb1c0d91c2afd3b123c92d105b282dcb Mon Sep 17 00:00:00 2001 From: Jocelyn Date: Wed, 3 Jun 2026 10:58:51 -0300 Subject: [PATCH 1/2] Almost started over, June 3 2026 --- Lingo/Game.cs | 73 ++++++++++++++++++++++----------------------------- Lingo/Play.cs | 11 ++++++++ 2 files changed, 42 insertions(+), 42 deletions(-) create mode 100644 Lingo/Play.cs diff --git a/Lingo/Game.cs b/Lingo/Game.cs index 00786e8..9cb0eb9 100644 --- a/Lingo/Game.cs +++ b/Lingo/Game.cs @@ -1,57 +1,46 @@ -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices.JavaScript; +using System.Reflection.Metadata.Ecma335; +using System.Security.Cryptography; using Spectre.Console; - namespace Lingo; -public class Attempt +public class Game { + private int count = 0; static Random rnd = new Random(); - public int Tries { get; private set; } - - private static int unit = rnd.Next(1, Words.FiveLetterWords.Count); - public string Solution = Words.FiveLetterWords[unit]; - - public string trying; - - private void catchingLengthErrors(string solution) - { - while (solution.Length != 5) - { - unit = rnd.Next(1, Words.FiveLetterWords.Count); - solution = Words.FiveLetterWords[unit]; - } - } - - public string lineOne = ""; - public string lineTwo = ""; - public string lineThree = ""; - public string lineFour = ""; - public string lineFive = ""; - - public void GameTurn() - { - AnsiConsole.MarkupLine($"[blue]Attempt #{Tries}[/]"); - Console.ReadLine(); - - //Don't forget, we need big logicc here! - } - - public Attempt() + private static int index = rnd.Next(1, Words.FiveLetterWords.Count); + private static string solution = Words.FiveLetterWords[index]; + private static bool exit = false; + public void validateFiveLetters(string solution) { - if (trying.Length == 5) + while (exit == false) { - Attempt attempt = new Attempt(); - while (attempt.Tries <= 5) + if (solution.Length != 5) { - AnsiConsole.MarkupLine($"Attempt #{Tries}"); - attempt.GameTurn(); + index = rnd.Next(1, Words.FiveLetterWords.Count); + } + else + { + exit = true; } } - else + } + + private List attemptList; + + private void createCharList(string solution) + { + foreach (char c in solution) { - AnsiConsole.MarkupLine($"[red]Please enter a try that has 5 letters only![/]"); + attemptList.Add(c); } } + + + public Game() + { + validateFiveLetters(solution); + createCharList(solution); + + } } \ No newline at end of file diff --git a/Lingo/Play.cs b/Lingo/Play.cs new file mode 100644 index 0000000..af8a332 --- /dev/null +++ b/Lingo/Play.cs @@ -0,0 +1,11 @@ +namespace Lingo; + +public class Play +{ + public Play() + { + + } + + public int I { get; private set; } +} \ No newline at end of file From e2bcf46be73d7990940f0eff1e37e8ff466c8ce7 Mon Sep 17 00:00:00 2001 From: Jocelyn Date: Wed, 3 Jun 2026 10:59:50 -0300 Subject: [PATCH 2/2] committing --- .idea/.idea.Lingo/.idea/.gitignore | 15 +++++++++++++++ .idea/.idea.Lingo/.idea/encodings.xml | 4 ++++ .idea/.idea.Lingo/.idea/indexLayout.xml | 8 ++++++++ .idea/.idea.Lingo/.idea/vcs.xml | 6 ++++++ 4 files changed, 33 insertions(+) create mode 100644 .idea/.idea.Lingo/.idea/.gitignore create mode 100644 .idea/.idea.Lingo/.idea/encodings.xml create mode 100644 .idea/.idea.Lingo/.idea/indexLayout.xml create mode 100644 .idea/.idea.Lingo/.idea/vcs.xml diff --git a/.idea/.idea.Lingo/.idea/.gitignore b/.idea/.idea.Lingo/.idea/.gitignore new file mode 100644 index 0000000..f59801f --- /dev/null +++ b/.idea/.idea.Lingo/.idea/.gitignore @@ -0,0 +1,15 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/contentModel.xml +/.idea.Lingo.iml +/modules.xml +/projectSettingsUpdater.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.idea.Lingo/.idea/encodings.xml b/.idea/.idea.Lingo/.idea/encodings.xml new file mode 100644 index 0000000..df87cf9 --- /dev/null +++ b/.idea/.idea.Lingo/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.Lingo/.idea/indexLayout.xml b/.idea/.idea.Lingo/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/.idea/.idea.Lingo/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.Lingo/.idea/vcs.xml b/.idea/.idea.Lingo/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/.idea.Lingo/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file