From 9485fbe384c463c399e5f9621e95b8868d0f7c6f Mon Sep 17 00:00:00 2001
From: Leo Lin <91626808+leolin2810@users.noreply.github.com>
Date: Thu, 19 Feb 2026 18:31:19 -0500
Subject: [PATCH 1/7] Code Review Request
---
ConsoleApp1.sln | 25 ++
MathGame.leolin2810/ConsoleApp1.csproj | 10 +
MathGame.leolin2810/ConsoleApp1.sln | 24 ++
MathGame.leolin2810/Game.cs | 106 ++++++
MathGame.leolin2810/Problem.cs | 159 +++++++++
MathGame.leolin2810/Program.cs | 306 ++++++++++++++++++
.../obj/ConsoleApp1.csproj.nuget.dgspec.json | 73 +++++
.../obj/ConsoleApp1.csproj.nuget.g.props | 16 +
.../obj/ConsoleApp1.csproj.nuget.g.targets | 2 +
.../Debug/net8.0/ConsoleApp1.AssemblyInfo.cs | 23 ++
.../ConsoleApp1.AssemblyInfoInputs.cache | 1 +
....GeneratedMSBuildEditorConfig.editorconfig | 15 +
.../net8.0/ConsoleApp1.GlobalUsings.g.cs | 8 +
.../obj/Debug/net8.0/ConsoleApp1.assets.cache | Bin 0 -> 228 bytes
MathGame.leolin2810/obj/project.assets.json | 79 +++++
MathGame.leolin2810/obj/project.nuget.cache | 8 +
README.md | 1 +
17 files changed, 856 insertions(+)
create mode 100644 ConsoleApp1.sln
create mode 100644 MathGame.leolin2810/ConsoleApp1.csproj
create mode 100644 MathGame.leolin2810/ConsoleApp1.sln
create mode 100644 MathGame.leolin2810/Game.cs
create mode 100644 MathGame.leolin2810/Problem.cs
create mode 100644 MathGame.leolin2810/Program.cs
create mode 100644 MathGame.leolin2810/obj/ConsoleApp1.csproj.nuget.dgspec.json
create mode 100644 MathGame.leolin2810/obj/ConsoleApp1.csproj.nuget.g.props
create mode 100644 MathGame.leolin2810/obj/ConsoleApp1.csproj.nuget.g.targets
create mode 100644 MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.AssemblyInfo.cs
create mode 100644 MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.AssemblyInfoInputs.cache
create mode 100644 MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.GeneratedMSBuildEditorConfig.editorconfig
create mode 100644 MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.GlobalUsings.g.cs
create mode 100644 MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.assets.cache
create mode 100644 MathGame.leolin2810/obj/project.assets.json
create mode 100644 MathGame.leolin2810/obj/project.nuget.cache
create mode 100644 README.md
diff --git a/ConsoleApp1.sln b/ConsoleApp1.sln
new file mode 100644
index 00000000..6d514e84
--- /dev/null
+++ b/ConsoleApp1.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.14.36811.4 d17.14
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{2B7C869A-7B29-4973-8E40-D4280C301D19}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2B7C869A-7B29-4973-8E40-D4280C301D19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B7C869A-7B29-4973-8E40-D4280C301D19}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2B7C869A-7B29-4973-8E40-D4280C301D19}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2B7C869A-7B29-4973-8E40-D4280C301D19}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {FA0C5B78-59FC-4F91-A35F-4547F4FE40F8}
+ EndGlobalSection
+EndGlobal
diff --git a/MathGame.leolin2810/ConsoleApp1.csproj b/MathGame.leolin2810/ConsoleApp1.csproj
new file mode 100644
index 00000000..206b89a9
--- /dev/null
+++ b/MathGame.leolin2810/ConsoleApp1.csproj
@@ -0,0 +1,10 @@
+
+
+
+ Exe
+ net8.0
+ enable
+ enable
+
+
+
diff --git a/MathGame.leolin2810/ConsoleApp1.sln b/MathGame.leolin2810/ConsoleApp1.sln
new file mode 100644
index 00000000..1586990f
--- /dev/null
+++ b/MathGame.leolin2810/ConsoleApp1.sln
@@ -0,0 +1,24 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.5.2.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1.csproj", "{7B5B0BC2-7E08-E58C-6436-F53A2B87BA1D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7B5B0BC2-7E08-E58C-6436-F53A2B87BA1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7B5B0BC2-7E08-E58C-6436-F53A2B87BA1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7B5B0BC2-7E08-E58C-6436-F53A2B87BA1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7B5B0BC2-7E08-E58C-6436-F53A2B87BA1D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {72B9E995-B8AB-4117-A663-A4DA72F723CF}
+ EndGlobalSection
+EndGlobal
diff --git a/MathGame.leolin2810/Game.cs b/MathGame.leolin2810/Game.cs
new file mode 100644
index 00000000..461c789f
--- /dev/null
+++ b/MathGame.leolin2810/Game.cs
@@ -0,0 +1,106 @@
+namespace ConsoleApp1
+{
+ class Game
+ {
+ // Defaults to 5 problems per game, but can be changed by user input
+ private int problemCount = 5;
+ public List problems = new();
+ private int operation = 5;
+ private int difficulty = 1;
+ private int score = 0;
+ private int time = 0;
+
+ public void AddScore(int score)
+ {
+ score += score;
+ }
+
+ public Game(int problemCountEntry = 5, int operationEntry = 5, int difficultyEntry = 1)
+ {
+ problemCount = problemCountEntry;
+ operation = operationEntry;
+ difficulty = difficultyEntry;
+ }
+ // Current Setting Display
+ public void DisplaySettings()
+ {
+ Console.WriteLine("Current Settings:");
+ DisplayProblemCount();
+ DisplayOperationType();
+ DisplayDifficulty();
+ DisplayTime();
+ }
+
+ private void DisplayProblemCount()
+ {
+ Console.WriteLine($"Current number of problems: {problemCount}");
+ }
+ private void DisplayOperationType()
+ {
+ switch (operation)
+ {
+ case 1:
+ {
+ Console.WriteLine("Current operation: Addition");
+ break;
+ }
+ case 2:
+ {
+ Console.WriteLine("Current operation: Subtraction");
+ break;
+ }
+ case 3:
+ {
+ Console.WriteLine("Current operation: Multiplication");
+ break;
+ }
+ case 4:
+ {
+ Console.WriteLine("Current operation: Division");
+ break;
+ }
+ case 5:
+ {
+ Console.WriteLine("Current operation: Random");
+ break;
+ }
+ }
+ }
+ private void DisplayDifficulty()
+ {
+ Console.WriteLine($"Current difficulty: {difficulty}");
+ }
+
+ public void DisplayScore()
+ {
+ Console.WriteLine($"Your score was {score} out of {problemCount}.");
+ }
+
+ public void ClearProblemList()
+ {
+ problems.Clear();
+ }
+
+ public void GenerateProblems()
+ {
+
+ for (int i = 0; i < problemCount; i++)
+ {
+ Problem problem = new();
+ problem.GenerateEquation(operation, difficulty);
+ problems.Add(problem);
+ }
+ }
+
+ public void SetTime(DateTime start, DateTime end)
+ {
+ TimeSpan duration = end - start;
+ time = duration.Seconds;
+ }
+
+ public void DisplayTime()
+ {
+ Console.WriteLine($"Your time was {time} seconds.");
+ }
+ }
+}
diff --git a/MathGame.leolin2810/Problem.cs b/MathGame.leolin2810/Problem.cs
new file mode 100644
index 00000000..ddc8dd3b
--- /dev/null
+++ b/MathGame.leolin2810/Problem.cs
@@ -0,0 +1,159 @@
+namespace ConsoleApp1
+{
+ class Problem
+ {
+ private string equation = "";
+ private int solution;
+ private int moduloCheck;
+ private int maxVal;
+
+ private void SetMaxVal(int difficulty)
+ {
+ switch (difficulty)
+ {
+ case 1:
+ {
+ maxVal = 10;
+ break;
+ }
+ case 2:
+ {
+ maxVal = 50;
+ break;
+ }
+ case 3:
+ {
+ maxVal = 100;
+ break;
+ }
+ }
+ }
+ public void GenerateEquation(int operation = 5, int difficulty = 1)
+ {
+ Random random = new();
+ SetMaxVal(difficulty);
+
+ if (operation == 5)
+ {
+ operation = random.Next(0, 4)+1;
+ }
+
+
+ switch (operation)
+ {
+ // Addition
+ case 1:
+ {
+
+ Random randint1 = new();
+ Random randint2 = new();
+
+ int addend1 = randint1.Next(0, maxVal);
+ int addend2 = randint2.Next(0, maxVal);
+
+ equation = $"{addend1} + {addend2}";
+ solution = addend1 + addend2;
+ break;
+ }
+ // Subtraction
+ case 2:
+ {
+ do
+ {
+ Random randint1 = new();
+ Random randint2 = new();
+
+ int minuend = randint1.Next(0, maxVal);
+ int subtractend = randint2.Next(0, maxVal);
+
+ equation = $"{minuend} - {subtractend}";
+ solution = minuend - subtractend;
+ }
+ while (solution < 0);
+
+ break;
+ }
+ //Multiplication
+ case 3:
+ {
+ Random randint1 = new();
+ Random randint2 = new();
+
+ int factor1 = randint1.Next(0, maxVal);
+ int factor2 = randint2.Next(0, maxVal);
+
+ equation = $"{factor1} * {factor2}";
+ solution = factor1 * factor2;
+ break;
+ }
+ // Division
+ case 4:
+ {
+ do
+ {
+ Random randint1 = new();
+ Random randint2 = new();
+
+ int dividend = randint1.Next(0, maxVal);
+ int divisor = randint2.Next(0, maxVal);
+
+ equation = $"{dividend} \u00f7 {divisor}";
+
+ try
+ {
+ solution = dividend / divisor;
+ }
+ catch (DivideByZeroException ex)
+ {
+ continue;
+ }
+
+ moduloCheck = dividend % divisor;
+ //try
+ //{
+
+ //}
+ //catch (DivideByZeroException ex)
+ //{
+ // continue;
+ //}
+ }
+ while (moduloCheck != 0 || solution <= 0);
+
+ break;
+
+ }
+ }
+ }
+
+ public void DisplayEquation()
+ {
+ Console.WriteLine("What is the solution to the following equation?");
+ Console.WriteLine(equation);
+ //Console.WriteLine(Solution);
+ }
+
+ public int CheckSolution(string input)
+ {
+ int Input;
+ if (int.TryParse(input, out Input))
+ {
+ if (Input == solution)
+ {
+ Console.WriteLine("Correct!");
+ return 1;
+ }
+ else
+ {
+ Console.WriteLine($"Incorrect. The correct answer is {solution}.");
+ return 0;
+ }
+ }
+ else
+ {
+ Console.WriteLine($"Invalid input. The correct answer is {solution}.");
+ return 0;
+ }
+ }
+ }
+}
diff --git a/MathGame.leolin2810/Program.cs b/MathGame.leolin2810/Program.cs
new file mode 100644
index 00000000..7e84c98c
--- /dev/null
+++ b/MathGame.leolin2810/Program.cs
@@ -0,0 +1,306 @@
+using System.Threading.Tasks.Sources;
+using static System.Formats.Asn1.AsnWriter;
+
+namespace ConsoleApp1
+{
+ class Program
+ {
+ private int problemCount = 5;
+ private int operation = 5;
+ private int difficulty = 1;
+ List games = new();
+
+ static void Main()
+ {
+ Program Application = new();
+ Game App = new();
+ while (true)
+ {
+ Console.Clear();
+ Program.PromptUser();
+ Console.WriteLine("-----------------------");
+ Application.DisplayCurrentSettings();
+ Console.WriteLine("-----------------------");
+ Application.EvaluatePromptUserInput();
+ }
+
+ }
+ /*-------------------------Menu Display Methods-------------------------*/
+ public static void PromptUser()
+ {
+ Console.WriteLine("Welcome to the Math Game!");
+
+ Console.WriteLine("1. Start Game");
+ Console.WriteLine("2. Change Number of Problems");
+ Console.WriteLine("3. Specify the Operation");
+ Console.WriteLine("4. Change the Difficulty");
+ Console.WriteLine("5. View Past Scores");
+ Console.WriteLine("6. Exit");
+ }
+
+ public void DisplayCurrentSettings()
+ {
+ Console.WriteLine("Current Settings:");
+ DisplayProblemCount();
+ DisplayOperationType();
+ DisplayDifficulty();
+ }
+
+ private void DisplayProblemCount()
+ {
+ Console.WriteLine($"Current number of problems: {problemCount}");
+ }
+
+ private void DisplayOperationType()
+ {
+ switch (operation)
+ {
+ case 1:
+ {
+ Console.WriteLine("Current operation: Addition");
+ break;
+ }
+ case 2:
+ {
+ Console.WriteLine("Current operation: Subtraction");
+ break;
+ }
+ case 3:
+ {
+ Console.WriteLine("Current operation: Multiplication");
+ break;
+ }
+ case 4:
+ {
+ Console.WriteLine("Current operation: Division");
+ break;
+ }
+ case 5:
+ {
+ Console.WriteLine("Current operation: Random");
+ break;
+ }
+ }
+ }
+ private void DisplayDifficulty()
+ {
+ Console.WriteLine($"Current difficulty: {difficulty}");
+ }
+
+ /*-------------------------Problem Count Methods-------------------------*/
+ private static void PromptProblemCount()
+ {
+ Console.Clear();
+ Console.WriteLine("How many problems would you like to practice?");
+ Console.WriteLine("Enter a number greater than 0: ");
+ }
+
+ public void EvaluatePromptProblemCountInput()
+ {
+ int Input;
+ while (true)
+ {
+ string temp = Console.ReadLine();
+
+ // Parsing a null returns 0, which is out of range of the conditions between 1 to 5
+ if (int.TryParse(temp, out Input))
+ {
+ if (Input >= 5)
+ {
+ problemCount = Input;
+ break;
+ }
+ ;
+ Console.WriteLine("Please enter a number greater than 5.");
+ continue;
+ }
+ else
+ {
+ Console.WriteLine("Invalid input. Please enter a number.");
+ }
+
+ }
+ }
+
+ /*-------------------------Operation Select Methods-------------------------*/
+ private static void PromptOperation()
+ {
+ Console.Clear();
+ Console.WriteLine("Which operation would you like to practice?");
+ Console.WriteLine("1. Addition");
+ Console.WriteLine("2. Subtraction");
+ Console.WriteLine("3. Multiplication");
+ Console.WriteLine("4. Division");
+ Console.WriteLine("5. Random");
+ Console.WriteLine("Enter the number associated with the operation you want to practice: ");
+ }
+
+ public void EvaluatePromptOperationInput()
+ {
+ int Input;
+ while (true)
+ {
+ string temp = Console.ReadLine();
+
+ // Parsing a null returns 0, which is out of range of the conditions between 1 to 5
+ if (int.TryParse(temp, out Input))
+ {
+ if (Input <= 5 && Input >= 1)
+ {
+
+ operation = Input;
+ Console.WriteLine(operation);
+ break;
+ }
+ ;
+ Console.WriteLine("Please enter a number between 1 and 5.");
+ continue;
+ }
+ else
+ {
+ Console.WriteLine("Invalid input. Please enter a number.");
+ }
+
+ }
+ }
+
+ /*-------------------------Difficulty Select Methods-------------------------*/
+ private static void PromptDifficulty()
+ {
+ Console.Clear();
+ Console.WriteLine("Which difficulty would you like to practice?");
+ Console.WriteLine("1. Easy (0-10)");
+ Console.WriteLine("2. Medium (0-50)");
+ Console.WriteLine("3. Hard (0-100)");
+ Console.WriteLine("Enter the number associated with the difficulty you want to practice: ");
+ }
+
+ // Technically, the skeleton for this code is a copy of EvaluatePromptOperationInput(), but kept as a separate method for clarity
+ public void EvaluatePromptDifficultyInput()
+ {
+ int Input;
+ while (true)
+ {
+ string temp = Console.ReadLine();
+
+ // Parsing a null returns 0, which is out of range of the conditions between 1 to 5
+ if (int.TryParse(temp, out Input))
+ {
+ if (Input <= 3 && Input >= 1)
+ {
+ difficulty = Input;
+ break;
+ }
+ ;
+ Console.WriteLine("Please enter a number between 1 and 3.");
+ continue;
+ }
+ else
+ {
+ Console.WriteLine("Invalid input. Please enter a number.");
+ }
+
+ }
+ }
+
+ /*-------------------------Main User Input Methods-------------------------*/
+ public void EvaluatePromptUserInput()
+ {
+ // Checks for valid input from user
+ int Input;
+ while (true)
+ {
+ Console.WriteLine("Enter the number associated with what you want to do: ");
+ string temp = Console.ReadLine();
+
+ // Parsing a null returns 0, which is out of range of the conditions between 1 to 5
+ if (int.TryParse(temp, out Input))
+ {
+ if (Input <= 6 && Input >= 1)
+ {
+ break;
+ }
+ ;
+ Console.WriteLine("Please enter a number between 1 and 5.");
+ continue;
+ }
+ else
+ {
+ Console.WriteLine("Invalid input. Please enter a number.");
+
+ }
+
+ }
+
+ // Performs the action associated with the user input
+ switch (Input)
+ {
+ case 1:
+ {
+ Console.Clear();
+ Game NewGame = new(problemCount, operation, difficulty);
+ NewGame.ClearProblemList();
+ NewGame.GenerateProblems();
+ DateTime StartTime = DateTime.Now;
+ foreach (Problem problem in NewGame.Problems)
+ {
+ problem.DisplayEquation();
+ NewGame.AddScore(problem.CheckSolution(Console.ReadLine()));
+ }
+ DateTime EndTime = DateTime.Now;
+ NewGame.SetTime(StartTime, EndTime);
+ games.Add(NewGame);
+ break;
+ }
+ case 2:
+ {
+ PromptProblemCount();
+ EvaluatePromptProblemCountInput();
+ break;
+ }
+ case 3:
+ {
+ PromptOperation();
+ EvaluatePromptOperationInput();
+ break;
+ }
+ case 4:
+ {
+ PromptDifficulty();
+ EvaluatePromptDifficultyInput();
+ break;
+ }
+ case 5:
+ {
+ Console.Clear();
+ Console.WriteLine("Displaying past game scores...");
+ foreach (Game game in games)
+ {
+ game.DisplaySettings();
+ Console.WriteLine("");
+ game.DisplayScore();
+ Console.WriteLine("-----------------------");
+ }
+ Console.WriteLine("Press any key to return to the main menu.");
+ Console.ReadKey();
+ break;
+ }
+ case 6:
+ {
+ Console.WriteLine("Exiting...");
+ System.Environment.Exit(0);
+ break;
+ }
+
+ // Given the parsing in the previous step, this shouldn't be reached realistically
+ default:
+ {
+ Console.WriteLine("Invalid input. Please enter a number between 1 and 5.");
+ break;
+ }
+ }
+ }
+
+
+ }
+}
diff --git a/MathGame.leolin2810/obj/ConsoleApp1.csproj.nuget.dgspec.json b/MathGame.leolin2810/obj/ConsoleApp1.csproj.nuget.dgspec.json
new file mode 100644
index 00000000..b3a245a7
--- /dev/null
+++ b/MathGame.leolin2810/obj/ConsoleApp1.csproj.nuget.dgspec.json
@@ -0,0 +1,73 @@
+{
+ "format": 1,
+ "restore": {
+ "C:\\Users\\leoli\\source\\repos\\CS_Academy_MathGame\\ConsoleApp1\\ConsoleApp1.csproj": {}
+ },
+ "projects": {
+ "C:\\Users\\leoli\\source\\repos\\CS_Academy_MathGame\\ConsoleApp1\\ConsoleApp1.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\leoli\\source\\repos\\CS_Academy_MathGame\\ConsoleApp1\\ConsoleApp1.csproj",
+ "projectName": "ConsoleApp1",
+ "projectPath": "C:\\Users\\leoli\\source\\repos\\CS_Academy_MathGame\\ConsoleApp1\\ConsoleApp1.csproj",
+ "packagesPath": "C:\\Users\\leoli\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\leoli\\source\\repos\\CS_Academy_MathGame\\ConsoleApp1\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\leoli\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "net8.0"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ },
+ "restoreAuditProperties": {
+ "enableAudit": "true",
+ "auditLevel": "low",
+ "auditMode": "direct"
+ },
+ "SdkAnalysisLevel": "9.0.300"
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.310/PortableRuntimeIdentifierGraph.json"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/MathGame.leolin2810/obj/ConsoleApp1.csproj.nuget.g.props b/MathGame.leolin2810/obj/ConsoleApp1.csproj.nuget.g.props
new file mode 100644
index 00000000..5b2e500d
--- /dev/null
+++ b/MathGame.leolin2810/obj/ConsoleApp1.csproj.nuget.g.props
@@ -0,0 +1,16 @@
+
+
+
+ True
+ NuGet
+ $(MSBuildThisFileDirectory)project.assets.json
+ $(UserProfile)\.nuget\packages\
+ C:\Users\leoli\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages
+ PackageReference
+ 6.14.2
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MathGame.leolin2810/obj/ConsoleApp1.csproj.nuget.g.targets b/MathGame.leolin2810/obj/ConsoleApp1.csproj.nuget.g.targets
new file mode 100644
index 00000000..35a7576c
--- /dev/null
+++ b/MathGame.leolin2810/obj/ConsoleApp1.csproj.nuget.g.targets
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.AssemblyInfo.cs b/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.AssemblyInfo.cs
new file mode 100644
index 00000000..03c09244
--- /dev/null
+++ b/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.AssemblyInfo.cs
@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+
+[assembly: System.Reflection.AssemblyCompanyAttribute("ConsoleApp1")]
+[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cbc75ad34a85456e020baf9407750d81c701a423")]
+[assembly: System.Reflection.AssemblyProductAttribute("ConsoleApp1")]
+[assembly: System.Reflection.AssemblyTitleAttribute("ConsoleApp1")]
+[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
+
+// Generated by the MSBuild WriteCodeFragment class.
+
diff --git a/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.AssemblyInfoInputs.cache b/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.AssemblyInfoInputs.cache
new file mode 100644
index 00000000..f36209c6
--- /dev/null
+++ b/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.AssemblyInfoInputs.cache
@@ -0,0 +1 @@
+116007794ef50f54b3691bbf9e8a3f98acaccea1b6378145db6595a4d605d3f1
diff --git a/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.GeneratedMSBuildEditorConfig.editorconfig b/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.GeneratedMSBuildEditorConfig.editorconfig
new file mode 100644
index 00000000..d8a405d1
--- /dev/null
+++ b/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.GeneratedMSBuildEditorConfig.editorconfig
@@ -0,0 +1,15 @@
+is_global = true
+build_property.TargetFramework = net8.0
+build_property.TargetPlatformMinVersion =
+build_property.UsingMicrosoftNETSdkWeb =
+build_property.ProjectTypeGuids =
+build_property.InvariantGlobalization =
+build_property.PlatformNeutralAssembly =
+build_property.EnforceExtendedAnalyzerRules =
+build_property._SupportedPlatformList = Linux,macOS,Windows
+build_property.RootNamespace = ConsoleApp1
+build_property.ProjectDir = C:\Users\leoli\source\repos\CS_Academy_MathGame\ConsoleApp1\
+build_property.EnableComHosting =
+build_property.EnableGeneratedComInterfaceComImportInterop =
+build_property.EffectiveAnalysisLevelStyle = 8.0
+build_property.EnableCodeStyleSeverity =
diff --git a/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.GlobalUsings.g.cs b/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.GlobalUsings.g.cs
new file mode 100644
index 00000000..ac22929d
--- /dev/null
+++ b/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.GlobalUsings.g.cs
@@ -0,0 +1,8 @@
+//
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.IO;
+global using global::System.Linq;
+global using global::System.Net.Http;
+global using global::System.Threading;
+global using global::System.Threading.Tasks;
diff --git a/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.assets.cache b/MathGame.leolin2810/obj/Debug/net8.0/ConsoleApp1.assets.cache
new file mode 100644
index 0000000000000000000000000000000000000000..f4df9b02687067786808b66b64da6b02aefa35b5
GIT binary patch
literal 228
zcmWIWc6a1qU|_JAJy&DCvGV%VksU8ZsrAhXeiPV}dghi&9f!{7T(ZO9G&V5pov*
DT>duZ
literal 0
HcmV?d00001
diff --git a/MathGame.leolin2810/obj/project.assets.json b/MathGame.leolin2810/obj/project.assets.json
new file mode 100644
index 00000000..2a71d185
--- /dev/null
+++ b/MathGame.leolin2810/obj/project.assets.json
@@ -0,0 +1,79 @@
+{
+ "version": 3,
+ "targets": {
+ "net8.0": {}
+ },
+ "libraries": {},
+ "projectFileDependencyGroups": {
+ "net8.0": []
+ },
+ "packageFolders": {
+ "C:\\Users\\leoli\\.nuget\\packages\\": {},
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\leoli\\source\\repos\\CS_Academy_MathGame\\ConsoleApp1\\ConsoleApp1.csproj",
+ "projectName": "ConsoleApp1",
+ "projectPath": "C:\\Users\\leoli\\source\\repos\\CS_Academy_MathGame\\ConsoleApp1\\ConsoleApp1.csproj",
+ "packagesPath": "C:\\Users\\leoli\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\leoli\\source\\repos\\CS_Academy_MathGame\\ConsoleApp1\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\leoli\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "net8.0"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ },
+ "restoreAuditProperties": {
+ "enableAudit": "true",
+ "auditLevel": "low",
+ "auditMode": "direct"
+ },
+ "SdkAnalysisLevel": "9.0.300"
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.310/PortableRuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/MathGame.leolin2810/obj/project.nuget.cache b/MathGame.leolin2810/obj/project.nuget.cache
new file mode 100644
index 00000000..fbfe276a
--- /dev/null
+++ b/MathGame.leolin2810/obj/project.nuget.cache
@@ -0,0 +1,8 @@
+{
+ "version": 2,
+ "dgSpecHash": "rGAHdC9zfas=",
+ "success": true,
+ "projectFilePath": "C:\\Users\\leoli\\source\\repos\\CS_Academy_MathGame\\ConsoleApp1\\ConsoleApp1.csproj",
+ "expectedPackageFiles": [],
+ "logs": []
+}
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..c21ba259
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# ConsoleApp1
\ No newline at end of file
From fbb8ce16b82a08ab75a5600c0853808abf7dadab Mon Sep 17 00:00:00 2001
From: Leo Lin <91626808+leolin2810@users.noreply.github.com>
Date: Thu, 19 Feb 2026 18:39:40 -0500
Subject: [PATCH 2/7] Updated initialization of score and time per code style
standards
---
MathGame.leolin2810/Game.cs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/MathGame.leolin2810/Game.cs b/MathGame.leolin2810/Game.cs
index 461c789f..f50b690d 100644
--- a/MathGame.leolin2810/Game.cs
+++ b/MathGame.leolin2810/Game.cs
@@ -7,8 +7,8 @@ class Game
public List problems = new();
private int operation = 5;
private int difficulty = 1;
- private int score = 0;
- private int time = 0;
+ private int score;
+ private int time;
public void AddScore(int score)
{
@@ -104,3 +104,4 @@ public void DisplayTime()
}
}
}
+
From db96a99a8600b1c6f1f64f1e388b5aae0a6afce2 Mon Sep 17 00:00:00 2001
From: Leo Lin <91626808+leolin2810@users.noreply.github.com>
Date: Thu, 19 Feb 2026 18:46:56 -0500
Subject: [PATCH 3/7] Fixed typo with calling problems from Game class
---
MathGame.leolin2810/Program.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/MathGame.leolin2810/Program.cs b/MathGame.leolin2810/Program.cs
index 7e84c98c..dfdc8f59 100644
--- a/MathGame.leolin2810/Program.cs
+++ b/MathGame.leolin2810/Program.cs
@@ -242,7 +242,7 @@ public void EvaluatePromptUserInput()
NewGame.ClearProblemList();
NewGame.GenerateProblems();
DateTime StartTime = DateTime.Now;
- foreach (Problem problem in NewGame.Problems)
+ foreach (Problem problem in NewGame.problems)
{
problem.DisplayEquation();
NewGame.AddScore(problem.CheckSolution(Console.ReadLine()));
@@ -304,3 +304,4 @@ public void EvaluatePromptUserInput()
}
}
+
From daa9f59cada60da93ccaa9ef12dbc664d101e270 Mon Sep 17 00:00:00 2001
From: Leo Lin <91626808+leolin2810@users.noreply.github.com>
Date: Thu, 19 Feb 2026 18:51:31 -0500
Subject: [PATCH 4/7] Remove the unused local variable 'App'.
---
MathGame.leolin2810/Program.cs | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/MathGame.leolin2810/Program.cs b/MathGame.leolin2810/Program.cs
index dfdc8f59..7c90b1db 100644
--- a/MathGame.leolin2810/Program.cs
+++ b/MathGame.leolin2810/Program.cs
@@ -1,4 +1,3 @@
-using System.Threading.Tasks.Sources;
using static System.Formats.Asn1.AsnWriter;
namespace ConsoleApp1
@@ -13,7 +12,6 @@ class Program
static void Main()
{
Program Application = new();
- Game App = new();
while (true)
{
Console.Clear();
@@ -110,7 +108,6 @@ public void EvaluatePromptProblemCountInput()
problemCount = Input;
break;
}
- ;
Console.WriteLine("Please enter a number greater than 5.");
continue;
}
@@ -305,3 +302,4 @@ public void EvaluatePromptUserInput()
}
}
+
From c5381caa77decf84d87af30e9ac4f1839bad3725 Mon Sep 17 00:00:00 2001
From: Leo Lin <91626808+leolin2810@users.noreply.github.com>
Date: Thu, 19 Feb 2026 18:55:20 -0500
Subject: [PATCH 5/7] More empty statement removals
---
MathGame.leolin2810/Program.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MathGame.leolin2810/Program.cs b/MathGame.leolin2810/Program.cs
index 7c90b1db..838f1a4c 100644
--- a/MathGame.leolin2810/Program.cs
+++ b/MathGame.leolin2810/Program.cs
@@ -149,7 +149,6 @@ public void EvaluatePromptOperationInput()
Console.WriteLine(operation);
break;
}
- ;
Console.WriteLine("Please enter a number between 1 and 5.");
continue;
}
@@ -303,3 +302,4 @@ public void EvaluatePromptUserInput()
}
+
From a0f2a164d62b7fcf7d59d2f79305d5b7b49bfb76 Mon Sep 17 00:00:00 2001
From: Leo Lin <91626808+leolin2810@users.noreply.github.com>
Date: Thu, 19 Feb 2026 18:58:44 -0500
Subject: [PATCH 6/7] I think that's the last one?
---
MathGame.leolin2810/Program.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MathGame.leolin2810/Program.cs b/MathGame.leolin2810/Program.cs
index 838f1a4c..e193cc89 100644
--- a/MathGame.leolin2810/Program.cs
+++ b/MathGame.leolin2810/Program.cs
@@ -216,7 +216,6 @@ public void EvaluatePromptUserInput()
{
break;
}
- ;
Console.WriteLine("Please enter a number between 1 and 5.");
continue;
}
@@ -303,3 +302,4 @@ public void EvaluatePromptUserInput()
+
From 39473516b97ce61b0ab15d341f60848a8d4aac01 Mon Sep 17 00:00:00 2001
From: Leo Lin <91626808+leolin2810@users.noreply.github.com>
Date: Thu, 19 Feb 2026 19:02:25 -0500
Subject: [PATCH 7/7] For sure this is the last one, probably
---
MathGame.leolin2810/Program.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MathGame.leolin2810/Program.cs b/MathGame.leolin2810/Program.cs
index e193cc89..dcc654f4 100644
--- a/MathGame.leolin2810/Program.cs
+++ b/MathGame.leolin2810/Program.cs
@@ -187,7 +187,6 @@ public void EvaluatePromptDifficultyInput()
difficulty = Input;
break;
}
- ;
Console.WriteLine("Please enter a number between 1 and 3.");
continue;
}
@@ -303,3 +302,4 @@ public void EvaluatePromptUserInput()
+