Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions HelloWorld/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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}"
}
]
}
15 changes: 15 additions & 0 deletions HelloWorld/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/HelloWorld.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
6 changes: 5 additions & 1 deletion HelloWorld/HelloWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

}
28 changes: 28 additions & 0 deletions RockPaperScissors/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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}"
}
,]
}
15 changes: 15 additions & 0 deletions RockPaperScissors/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/RockPaperScissors.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
73 changes: 66 additions & 7 deletions RockPaperScissors/RockPaperScissors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
Binary file added SQL/.vs/.vs/.vs/v15/.suo
Binary file not shown.
6 changes: 6 additions & 0 deletions SQL/.vs/.vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file added SQL/.vs/.vs/slnx.sqlite
Binary file not shown.
Binary file added VisualStudio/IntroToVS/.vs/IntroToVS/v15/.suo
Binary file not shown.
Empty file.
Binary file not shown.
25 changes: 25 additions & 0 deletions VisualStudio/IntroToVS/IntroToVS.sln
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions VisualStudio/IntroToVS/IntroToVS/IntroToVS.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

</Project>
6 changes: 6 additions & 0 deletions VisualStudio/IntroToVS/IntroToVS/IntroToVS.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>false</ShowAllFiles>
</PropertyGroup>
</Project>
13 changes: 13 additions & 0 deletions VisualStudio/IntroToVS/IntroToVS/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;

namespace IntroToVS
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Sam is the best!");
Console.ReadLine();
}
}
}
3 changes: 3 additions & 0 deletions week9whiteboard/.vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
6 changes: 6 additions & 0 deletions week9whiteboard/.vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file added week9whiteboard/.vs/slnx.sqlite
Binary file not shown.
Binary file added week9whiteboard/.vs/week9whiteboard/v15/.suo
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28 changes: 28 additions & 0 deletions week9whiteboard/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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}"
}
,]
}
15 changes: 15 additions & 0 deletions week9whiteboard/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/week9whiteboard.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
30 changes: 30 additions & 0 deletions week9whiteboard/Program.cs
Original file line number Diff line number Diff line change
@@ -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<int, int> selector)
{
return values;
}
public static void Values(int[] values)
{
values = Orderby(values, selectMe);
Orderby(values, selectMe);
}
public static int selectMe(int x)
{
return x;
}
}
}
8 changes: 8 additions & 0 deletions week9whiteboard/week9whiteboard.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

</Project>