Compare commits

...

3 commits

Author SHA1 Message Date
Jocelyn
e2bcf46be7 committing 2026-06-03 10:59:50 -03:00
Jocelyn
bb0272132a Merge remote-tracking branch 'origin/main'
# Conflicts:
#	Lingo/Game.cs
2026-06-03 10:59:31 -03:00
Jocelyn
38500aebfb Almost started over, June 3 2026 2026-06-03 10:58:51 -03:00
6 changed files with 72 additions and 38 deletions

15
.idea/.idea.Lingo/.idea/.gitignore generated vendored Normal file
View file

@ -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

4
.idea/.idea.Lingo/.idea/encodings.xml generated Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

8
.idea/.idea.Lingo/.idea/indexLayout.xml generated Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

6
.idea/.idea.Lingo/.idea/vcs.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View file

@ -1,56 +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 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)
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)
{
while (solution.Length != 5)
while (exit == false)
{
unit = rnd.Next(1, Words.FiveLetterWords.Count);
solution = Words.FiveLetterWords[unit];
}
}
private string lineOne = "";
private string lineTwo = "";
private string lineThree = "";
private string lineFour = "";
private string lineFive = "";
public void GameTurn()
{
AnsiConsole.MarkupLine($"[blue]Attempt #{Tries}[/]");
Console.ReadLine();
//Don't forget, we need big logic here!
}
public Game()
{
if (trying.Length == 5)
{
Game game = new Game();
while (game.Tries <= 5)
if (solution.Length != 5)
{
AnsiConsole.MarkupLine($"Attempt #{Tries}");
game.GameTurn();
index = rnd.Next(1, Words.FiveLetterWords.Count);
}
else
{
exit = true;
}
}
else
}
private List<char> 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);
}
}

11
Lingo/Play.cs Normal file
View file

@ -0,0 +1,11 @@
namespace Lingo;
public class Play
{
public Play()
{
}
public int I { get; private set; }
}