diff --git a/HelloWorld/.vscode/launch.json b/HelloWorld/.vscode/launch.json
new file mode 100644
index 00000000..95d8af5c
--- /dev/null
+++ b/HelloWorld/.vscode/launch.json
@@ -0,0 +1,27 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+
+ {
+ "name": ".NET Core Launch (console)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/bin/Debug/netcoreapp2.0/HelloWorld.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}",
+ "console": "internalConsole",
+ "stopAtEntry": false,
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "name": ".NET Core Attach",
+ "type": "coreclr",
+ "request": "attach",
+ "processId": "${command:pickProcess}"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/HelloWorld/.vscode/tasks.json b/HelloWorld/.vscode/tasks.json
new file mode 100644
index 00000000..7cf275a8
--- /dev/null
+++ b/HelloWorld/.vscode/tasks.json
@@ -0,0 +1,15 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/HelloWorld.csproj"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/HelloWorld/HelloWorld.cs b/HelloWorld/HelloWorld.cs
index 8168c805..3a382d3c 100644
--- a/HelloWorld/HelloWorld.cs
+++ b/HelloWorld/HelloWorld.cs
@@ -6,7 +6,11 @@ class Program
{
static void Main(string[] args)
{
- Console.WriteLine("Hello World!");
+ Console.WriteLine("Hello Sam!");
+ string yourName = Console.ReadLine();
+ Console.Write("Hello ");
+ Console.Write(yourName);
}
}
+
}
diff --git a/RockPaperScissors/.vscode/launch.json b/RockPaperScissors/.vscode/launch.json
new file mode 100644
index 00000000..d468e5fb
--- /dev/null
+++ b/RockPaperScissors/.vscode/launch.json
@@ -0,0 +1,28 @@
+{
+ // Use IntelliSense to find out which attributes exist for C# debugging
+ // Use hover for the description of the existing attributes
+ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": ".NET Core Launch (console)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ // If you have changed target frameworks, make sure to update the program path.
+ "program": "${workspaceFolder}/bin/Debug/netcoreapp2.0/RockPaperScissors.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}",
+ // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
+ "console": "internalConsole",
+ "stopAtEntry": false,
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "name": ".NET Core Attach",
+ "type": "coreclr",
+ "request": "attach",
+ "processId": "${command:pickProcess}"
+ }
+ ,]
+}
\ No newline at end of file
diff --git a/RockPaperScissors/.vscode/tasks.json b/RockPaperScissors/.vscode/tasks.json
new file mode 100644
index 00000000..9cdb0334
--- /dev/null
+++ b/RockPaperScissors/.vscode/tasks.json
@@ -0,0 +1,15 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/RockPaperScissors.csproj"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/RockPaperScissors/RockPaperScissors.cs b/RockPaperScissors/RockPaperScissors.cs
index 470ae756..3cb9c2ee 100644
--- a/RockPaperScissors/RockPaperScissors.cs
+++ b/RockPaperScissors/RockPaperScissors.cs
@@ -6,19 +6,78 @@ class Program
{
public static void Main()
{
- Console.WriteLine("Enter hand 1:");
- string hand1 = Console.ReadLine().ToLower();
- Console.WriteLine("Enter hand 2:");
- string hand2 = Console.ReadLine().ToLower();
- Console.WriteLine(CompareHands(hand1, hand2));
+ string[] answers = new string[] { "rock", "paper", "scissors" };
+ int index = 0;
+ Random r = new Random();
+ string computerPlayer = "";
+ int playerScore = 0;
+ int computerScore = 0;
+
+ do
+ {
+ Console.WriteLine("Enter choice Player:");
+ string hand1 = Console.ReadLine().ToLower();
+
+ index = r.Next(0, 3);
+ computerPlayer = answers[index];
+
+ string hand2 = computerPlayer;
+ Console.WriteLine($"Computer Plays: {computerPlayer}");
+ Console.WriteLine(CompareHands(hand1, hand2));
+ if (CompareHands(hand1, hand2) == "Player Wins!")
+ {
+ playerScore++;
+ Console.WriteLine($"Score: Player - {playerScore} | Score: Computer - {computerScore}");
+ }
+ else if (CompareHands(hand1, hand2) == "Computer Wins!")
+ {
+ computerScore++;
+ Console.WriteLine($"Score: Player - {playerScore} | Score: Computer - {computerScore}");
+ }
+ else
+ {
+ Console.WriteLine($"Score: Player - {playerScore} | Score: Computer - {computerScore}");
+ }
+ Console.WriteLine("Do you want to play again?");
+ } while (Console.ReadLine() == "yes");
// leave this command at the end so your program does not close automatically
Console.ReadLine();
}
-
+
public static string CompareHands(string hand1, string hand2)
{
- // Your code here
+ if (hand1 == hand2)
+ {
+ return "It's a tie!";
+ }
+ if (hand1 == "rock")
+ {
+ if (hand2 == "scissors")
+ {
+ return "Player Wins!";
+ }
+ return "Computer Wins!";
+ }
+
+ if (hand1 == "paper")
+ {
+ if (hand2 == "rock")
+ {
+ return "Player Wins!";
+ }
+ return "Computer Wins!";
+ }
+
+ if (hand1 == "scissors")
+ {
+ if (hand2 == "paper")
+ {
+
+ return "Player Wins!";
+ }
+ return "Computer Wins!";
+ }
return hand1 + ' ' + hand2;
}
}
diff --git a/SQL/.vs/.vs/.vs/v15/.suo b/SQL/.vs/.vs/.vs/v15/.suo
new file mode 100644
index 00000000..47326dae
Binary files /dev/null and b/SQL/.vs/.vs/.vs/v15/.suo differ
diff --git a/SQL/.vs/.vs/VSWorkspaceState.json b/SQL/.vs/.vs/VSWorkspaceState.json
new file mode 100644
index 00000000..6b611411
--- /dev/null
+++ b/SQL/.vs/.vs/VSWorkspaceState.json
@@ -0,0 +1,6 @@
+{
+ "ExpandedNodes": [
+ ""
+ ],
+ "PreviewInSolutionExplorer": false
+}
\ No newline at end of file
diff --git a/SQL/.vs/.vs/slnx.sqlite b/SQL/.vs/.vs/slnx.sqlite
new file mode 100644
index 00000000..4b3d4599
Binary files /dev/null and b/SQL/.vs/.vs/slnx.sqlite differ
diff --git a/VisualStudio/IntroToVS/.vs/IntroToVS/v15/.suo b/VisualStudio/IntroToVS/.vs/IntroToVS/v15/.suo
new file mode 100644
index 00000000..5709695f
Binary files /dev/null and b/VisualStudio/IntroToVS/.vs/IntroToVS/v15/.suo differ
diff --git a/VisualStudio/IntroToVS/.vs/IntroToVS/v15/Server/sqlite3/db.lock b/VisualStudio/IntroToVS/.vs/IntroToVS/v15/Server/sqlite3/db.lock
new file mode 100644
index 00000000..e69de29b
diff --git a/VisualStudio/IntroToVS/.vs/IntroToVS/v15/Server/sqlite3/storage.ide b/VisualStudio/IntroToVS/.vs/IntroToVS/v15/Server/sqlite3/storage.ide
new file mode 100644
index 00000000..f75d1ee5
Binary files /dev/null and b/VisualStudio/IntroToVS/.vs/IntroToVS/v15/Server/sqlite3/storage.ide differ
diff --git a/VisualStudio/IntroToVS/IntroToVS.sln b/VisualStudio/IntroToVS/IntroToVS.sln
new file mode 100644
index 00000000..f199a102
--- /dev/null
+++ b/VisualStudio/IntroToVS/IntroToVS.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.438
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntroToVS", "IntroToVS\IntroToVS.csproj", "{E4B58818-C97F-4FB1-8F82-8294FCB93A74}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E4B58818-C97F-4FB1-8F82-8294FCB93A74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E4B58818-C97F-4FB1-8F82-8294FCB93A74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E4B58818-C97F-4FB1-8F82-8294FCB93A74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E4B58818-C97F-4FB1-8F82-8294FCB93A74}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {E13EC136-5E10-46AA-8909-BFBCD0415EE9}
+ EndGlobalSection
+EndGlobal
diff --git a/VisualStudio/IntroToVS/IntroToVS/IntroToVS.csproj b/VisualStudio/IntroToVS/IntroToVS/IntroToVS.csproj
new file mode 100644
index 00000000..21dff5ca
--- /dev/null
+++ b/VisualStudio/IntroToVS/IntroToVS/IntroToVS.csproj
@@ -0,0 +1,8 @@
+
+
+
+ Exe
+ netcoreapp2.2
+
+
+
diff --git a/VisualStudio/IntroToVS/IntroToVS/IntroToVS.csproj.user b/VisualStudio/IntroToVS/IntroToVS/IntroToVS.csproj.user
new file mode 100644
index 00000000..baf24173
--- /dev/null
+++ b/VisualStudio/IntroToVS/IntroToVS/IntroToVS.csproj.user
@@ -0,0 +1,6 @@
+
+
+
+ false
+
+
\ No newline at end of file
diff --git a/VisualStudio/IntroToVS/IntroToVS/Program.cs b/VisualStudio/IntroToVS/IntroToVS/Program.cs
new file mode 100644
index 00000000..8b84f33d
--- /dev/null
+++ b/VisualStudio/IntroToVS/IntroToVS/Program.cs
@@ -0,0 +1,13 @@
+using System;
+
+namespace IntroToVS
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ Console.WriteLine("Sam is the best!");
+ Console.ReadLine();
+ }
+ }
+}
\ No newline at end of file
diff --git a/week9whiteboard/.vs/ProjectSettings.json b/week9whiteboard/.vs/ProjectSettings.json
new file mode 100644
index 00000000..f8b48885
--- /dev/null
+++ b/week9whiteboard/.vs/ProjectSettings.json
@@ -0,0 +1,3 @@
+{
+ "CurrentProjectSetting": null
+}
\ No newline at end of file
diff --git a/week9whiteboard/.vs/VSWorkspaceState.json b/week9whiteboard/.vs/VSWorkspaceState.json
new file mode 100644
index 00000000..6b611411
--- /dev/null
+++ b/week9whiteboard/.vs/VSWorkspaceState.json
@@ -0,0 +1,6 @@
+{
+ "ExpandedNodes": [
+ ""
+ ],
+ "PreviewInSolutionExplorer": false
+}
\ No newline at end of file
diff --git a/week9whiteboard/.vs/slnx.sqlite b/week9whiteboard/.vs/slnx.sqlite
new file mode 100644
index 00000000..c300b401
Binary files /dev/null and b/week9whiteboard/.vs/slnx.sqlite differ
diff --git a/week9whiteboard/.vs/week9whiteboard/v15/.suo b/week9whiteboard/.vs/week9whiteboard/v15/.suo
new file mode 100644
index 00000000..3c3f4fc1
Binary files /dev/null and b/week9whiteboard/.vs/week9whiteboard/v15/.suo differ
diff --git a/week9whiteboard/.vs/week9whiteboard/v15/Server/sqlite3/db.lock b/week9whiteboard/.vs/week9whiteboard/v15/Server/sqlite3/db.lock
new file mode 100644
index 00000000..e69de29b
diff --git a/week9whiteboard/.vs/week9whiteboard/v15/Server/sqlite3/storage.ide b/week9whiteboard/.vs/week9whiteboard/v15/Server/sqlite3/storage.ide
new file mode 100644
index 00000000..56758a88
Binary files /dev/null and b/week9whiteboard/.vs/week9whiteboard/v15/Server/sqlite3/storage.ide differ
diff --git a/week9whiteboard/.vs/week9whiteboard/v15/Server/sqlite3/storage.ide-shm b/week9whiteboard/.vs/week9whiteboard/v15/Server/sqlite3/storage.ide-shm
new file mode 100644
index 00000000..f9eaa185
Binary files /dev/null and b/week9whiteboard/.vs/week9whiteboard/v15/Server/sqlite3/storage.ide-shm differ
diff --git a/week9whiteboard/.vs/week9whiteboard/v15/Server/sqlite3/storage.ide-wal b/week9whiteboard/.vs/week9whiteboard/v15/Server/sqlite3/storage.ide-wal
new file mode 100644
index 00000000..83ee46eb
Binary files /dev/null and b/week9whiteboard/.vs/week9whiteboard/v15/Server/sqlite3/storage.ide-wal differ
diff --git a/week9whiteboard/.vscode/launch.json b/week9whiteboard/.vscode/launch.json
new file mode 100644
index 00000000..4de94855
--- /dev/null
+++ b/week9whiteboard/.vscode/launch.json
@@ -0,0 +1,28 @@
+{
+ // Use IntelliSense to find out which attributes exist for C# debugging
+ // Use hover for the description of the existing attributes
+ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": ".NET Core Launch (console)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ // If you have changed target frameworks, make sure to update the program path.
+ "program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/week9whiteboard.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}",
+ // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
+ "console": "internalConsole",
+ "stopAtEntry": false,
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "name": ".NET Core Attach",
+ "type": "coreclr",
+ "request": "attach",
+ "processId": "${command:pickProcess}"
+ }
+ ,]
+}
\ No newline at end of file
diff --git a/week9whiteboard/.vscode/tasks.json b/week9whiteboard/.vscode/tasks.json
new file mode 100644
index 00000000..d042ee64
--- /dev/null
+++ b/week9whiteboard/.vscode/tasks.json
@@ -0,0 +1,15 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/week9whiteboard.csproj"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/week9whiteboard/Program.cs b/week9whiteboard/Program.cs
new file mode 100644
index 00000000..9321970f
--- /dev/null
+++ b/week9whiteboard/Program.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Linq;
+using System.Collections.Generic;
+
+namespace week9whiteboard
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+
+ }
+ }
+ public static class SortExtensions
+ {
+ public static int[] Orderby(int[] values, Func selector)
+ {
+ return values;
+ }
+ public static void Values(int[] values)
+ {
+ values = Orderby(values, selectMe);
+ Orderby(values, selectMe);
+ }
+ public static int selectMe(int x)
+ {
+ return x;
+ }
+ }
+}
diff --git a/week9whiteboard/week9whiteboard.csproj b/week9whiteboard/week9whiteboard.csproj
new file mode 100644
index 00000000..21dff5ca
--- /dev/null
+++ b/week9whiteboard/week9whiteboard.csproj
@@ -0,0 +1,8 @@
+
+
+
+ Exe
+ netcoreapp2.2
+
+
+