introduce new bugs

This commit is contained in:
Your Name 2024-10-15 13:53:20 +02:00
parent b9a0d150b4
commit a59521470d

View File

@ -1,8 +1,8 @@
using Lab1;
using System.Text.Json;
using System.Text.Json;
using Lab1;
var rand = new Random();
var value = rand.Next(1, 101);
var value = rand.Next(1, 100);
int guess;
int trials = 0;
@ -17,8 +17,7 @@ do
Console.WriteLine("Za mało!");
trials++;
}
while (guess != value);
} while (guess != value);
Console.WriteLine($"Wygrana w {trials} próbie!");
Console.Write("Podaj swoje imię: ");
@ -40,4 +39,4 @@ File.WriteAllText(FileName, JsonSerializer.Serialize(highScores));
foreach (var item in highScores.OrderBy(x => x.Trials))
{
Console.WriteLine($"{item.Name} -- {item.Trials} prób");
}
}