Compare commits
No commits in common. "ca98a852e5db993743a2a9ada33dcaf260695bc5" and "bbd11ec87073abb7663380ab81dfa776182ce1d9" have entirely different histories.
ca98a852e5
...
bbd11ec870
@ -25,12 +25,10 @@ var name = Console.ReadLine() ?? "";
|
||||
|
||||
var hs = new HighScore { Name = name, Trials = trials };
|
||||
|
||||
List<HighScore>? highScores = null;
|
||||
List<HighScore> highScores = null;
|
||||
const string FileName = "highscores.json";
|
||||
if (File.Exists(FileName))
|
||||
highScores =
|
||||
JsonSerializer.Deserialize<List<HighScore>>(File.ReadAllText(FileName))
|
||||
?? new List<HighScore>();
|
||||
highScores = JsonSerializer.Deserialize<List<HighScore>>(File.ReadAllText(FileName));
|
||||
|
||||
if (highScores == null)
|
||||
highScores = new List<HighScore>();
|
||||
|
Loading…
Reference in New Issue
Block a user