Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f2c7f83
Saying hello to myself
ChaseWoods89 Jan 8, 2019
aec1f27
saying hello to myself
ChaseWoods89 Jan 8, 2019
2e6ad27
changed name
ChaseWoods89 Jan 8, 2019
d8c435f
finished homework project
ChaseWoods89 Jan 9, 2019
0e88afe
Merge pull request #1 from ChaseWoods89/cw
ChaseWoods89 Jan 9, 2019
443c486
classwork
ChaseWoods89 Jan 10, 2019
af08c2f
created new files for textbasedgame
ChaseWoods89 Jan 10, 2019
af5e7ac
testing git clone and making sure everything works
Jan 15, 2019
1487d61
Got a couple more segments finished up until seeing spider
ChaseWoods89 Jan 16, 2019
e961091
Fixed spider encounter, need to finish battle system
ChaseWoods89 Jan 16, 2019
4325b3a
Everything but the actual random integer
ChaseWoods89 Jan 16, 2019
1750b3f
made a ton of changed but keep getting errors on semi-colons.
ChaseWoods89 Jan 16, 2019
a289131
added csproj file
ChaseWoods89 Jan 16, 2019
ef1b8dc
still attempting to fix errors
ChaseWoods89 Jan 16, 2019
2549d2d
Finished textbasedgame, added a bit to RockPaperScissors
ChaseWoods89 Jan 17, 2019
2eba0f6
rockpaperscissors
ChaseWoods89 Jan 17, 2019
f9cd3fa
Merge pull request #2 from ChaseWoods89/TextBasedGame
ChaseWoods89 Jan 22, 2019
17155b7
Finished win conditions for TicTacToe
ChaseWoods89 Jan 22, 2019
769a214
started marking on the board, playerturn now set up
ChaseWoods89 Jan 22, 2019
ff57fde
fixing logic issues within PlaceMark
ChaseWoods89 Jan 22, 2019
4583f89
Finished FizzBuzz
ChaseWoods89 Jan 23, 2019
d49c612
actually finished FizzBuzz
ChaseWoods89 Jan 23, 2019
e7242d2
Merge pull request #3 from ChaseWoods89/FizzBuzz
ChaseWoods89 Jan 23, 2019
8f02cb5
had a few checkpoint things to commit
Jan 29, 2019
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
28 changes: 28 additions & 0 deletions Checkpoint1/.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/Checkpoint1.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 Checkpoint1/.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}/Checkpoint1.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
75 changes: 73 additions & 2 deletions Checkpoint1/Checkpoint1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,80 @@ namespace Checkpoint1
{
class Program
{
static void Main(string[] args)
static void Main()
{
Console.WriteLine("Hello World!");
Console.WriteLine("~~~~~~~~~~~~~~~Application 1~~~~~~~~~~~~~~~");
Console.WriteLine(100 / 3);

Console.WriteLine("~~~~~~~~~~~~~~~Application 2~~~~~~~~~~~~~~~");
Console.WriteLine("Please enter a number:");
int firstInput = int.Parse(Console.ReadLine());
Console.WriteLine("Please enter another number:");
int secondInput = int.Parse(Console.ReadLine());
Console.WriteLine("Please enter a final number:");
int thirdInput = int.Parse(Console.ReadLine());
if ((firstInput + secondInput + thirdInput) == 666){
Console.WriteLine("Your number is 666. HAIL SATAN!!!");
}
else{
Console.WriteLine("Your number is " + (firstInput + secondInput + thirdInput));
}



Console.WriteLine("~~~~~~~~~~~~~~~Application 3~~~~~~~~~~~~~~~");
Console.WriteLine("Please enter the number you wish to factorize");
int number = int.Parse(Console.ReadLine());
Console.WriteLine("The number you entered was {0} and it's factorial is {1}", number, Factorial(number));


Console.WriteLine("~~~~~~~~~~~~~~~Application 4~~~~~~~~~~~~~~~");
Random rnd= new Random();
int rndnumber = rnd.Next(1,11);
Console.WriteLine("I'm thinking of a number 1 through 10. Take a guess:");
int userGuessOne = int.Parse(Console.ReadLine());
if (rndnumber == userGuessOne){
Console.WriteLine("Wow, you got it on the first try! Way to go!");
}
else {
Console.WriteLine("Not the one, I'm thinking of. Try again!");
}
int userGuessTwo = int.Parse(Console.ReadLine());
if (rndnumber == userGuessTwo){
Console.WriteLine("Good job! Way to get it right!");
}
else {
Console.WriteLine("Missed again, give it another shot!");
}
int userGuessThree = int.Parse(Console.ReadLine());
if (rndnumber == userGuessThree){
Console.WriteLine("Third time is the charm! Way To Go!");
}
else {
Console.WriteLine("Missed three shots in a row huh? Give it ONE more try!");
}
int userGuessFour = int.Parse(Console.ReadLine());
if (rndnumber == userGuessFour){
Console.WriteLine("I knew you would come through in the end. Great job!");
}
else {
Console.WriteLine("Well...you miss 100% of the shots you don't take.");
}

Console.WriteLine("~~~~~~~~~~~~~~~Application 5~~~~~~~~~~~~~~~");
Console.WriteLine("Enter a set of numbers separated by a comma (,). Use as many as you'd like!");




Console.ReadKey(true);
}

static int Factorial(int n)
{
if (n >= 2) return n * Factorial(n - 1);
return 1;

}
}
}
20 changes: 19 additions & 1 deletion FizzBuzz/FizzBuzz.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,25 @@ class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
for (int i = 1; i <= 100; i++)
{
if (i % 3 == 0 && i % 5 == 0)
{
Console.WriteLine("FizzBuzz");
}
else if (i % 3 == 0)
{
Console.WriteLine("Fizz");
}
else if (i % 5 == 0)
{
Console.WriteLine("Buzz");
}
else
{
Console.WriteLine(i);
}
}
}
}
}
2 changes: 1 addition & 1 deletion HelloWorld/HelloWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.WriteLine("Hello Chase!");
}
}
}
17 changes: 17 additions & 0 deletions HelloWorld/HomeworkWeek1Lesson1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;

public class Program
{
public static void Main()
{
string name = "";
int age = 0;
int presidentAge = 35;

Console.WriteLine("Please enter your full name: ");
name = Console.ReadLine();
Console.WriteLine("Please enter your age: ");
age = Convert.ToInt32(Console.ReadLine());

Console.WriteLine("My fellow Americans, my name is {0} and I am {1} years old. I am running for presidency in {2} years.", name, age, presidentAge-age); }
}
17 changes: 17 additions & 0 deletions HelloWorld/PersonalInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;

public class Program
{
public static void Main()
{
string firstName = "Chase ";
string lastName = "Woods ";
int age = 29;
string job = "Lyft Driver";
string favoriteBand = "Animals As Leaders ";
string favoriteSportsTeam = "Dallas Cowboys ";

Console.WriteLine("Hello my name is" + firstName + lastName + "I am " + age + "years old and am a " + job + ". My favorite band is" My Favorite band is " + favoriteBand + "They are awesome. My favorite team is the " + favoriteSportsTeam + "I hope they win the Super Bowl." )

}
}
20 changes: 20 additions & 0 deletions HelloWorld/YardsToInches.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;

public class Program
{
public static void Main()
{
bool people = true;
bool f = false;
string YardsInput;

Console.WriteLine("How many Yards?");
YardsInput = Console.ReadLine();

int Yards = Convert.ToInt32(YardsInput);
int Inches = (Yards * 36);

Console.WriteLine("There are " + Inches + " inches in " + Yards + " Yards.");

}
}
45 changes: 40 additions & 5 deletions RockPaperScissors/RockPaperScissors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,59 @@

namespace RockPaperScissors
{
class Program
public class Program
{
public static void Main()
{
int scoreOne = 0;
int scoreTwo = 0;

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 winner = (CompareHands(hand1, hand2));
string[] winnerSep = winner.Split("*");
string winnerText = winnerSep[0];
int winnerAdd = Convert.ToInt32(winnerText);

if (winnerAdd == 1){
scoreOne++;
}

else if (winnerAdd == 2){
scoreTwo++;
}
Console.WriteLine(winnerText);
Console.WriteLine("The score is " + scoreOne + "to " + scoreTwo);

// 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
return hand1 + ' ' + hand2;
if (hand1==hand2){
return "It's a tie.";}


else if (hand1 == "rock" && hand2 == "scissors"){
return "Hand 1 Wins!!!*1";
}

else if (hand1 == "scissors" && hand2 == "paper"){
return "Hand 1 Wins!!!*1";
}

else if (hand1 == "paper" && hand2 == "rock"){
return "Hand 1 Wins!!!*1";

}

else {
return "Hand 1 Loses!!!*2";}


}
}
}
}
62 changes: 62 additions & 0 deletions TextBasedGame/TextBasedGame.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
using System;

public class Program
{
public static void Main()
{
Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
Console.WriteLine(" Welcome To The Cavern Of Secrets");
Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");

Console.WriteLine("You enter a dark cavern out of curiousity. It is dark, but you can make out the shape of a stick on the ground in front of you. Do you take it? (yes or no?)");
string StickInput = "";
string FightInput = "";
string SpiderInput = "";
StickInput = Console.ReadLine();

string[]options = new string[4];
options[0] = "y";
options[1] = "Y";
options[2] = "yes";
options[3] = "Yes";

if (Array.IndexOf(options,StickInput) >=0)
Console.WriteLine("You got the stick!");
else
Console.WriteLine("You left the stick behind.");

Console.WriteLine("Further into the cavern you spot something glowing in the distance do you approach it? (yes/no)");
SpiderInput = Console.ReadLine();

if (Array.IndexOf(options,SpiderInput) >=0)
Console.WriteLine("As you approach the glowing figure it starts to move towards you slowly.");

else
Console.WriteLine("As you move away from the glowing figure, you can see it move quickly towards you.");

Console.WriteLine("Your attention is drawn to the glowing figure which you now see clearly is a spider!");
Console.WriteLine("The spider is directly coming towards you with its fangs drawn. Do you attack it? (yes/no)");

FightInput = Console.ReadLine();

if (Array.IndexOf(options,FightInput) < 0)
{ Console.WriteLine("You turn to run out of the cave and lose your way in the darkness. The spider sinks its fangs into you as everything goes black.");
Console.WriteLine("Better luch next time.");
}

else
{
if (Array.IndexOf(options,StickInput) >=0)
Console.WriteLine("You attack the spider with the stick!");
Console.WriteLine("After striking the spider, it runs back off into the distance as you run out of the cave.");
Console.WriteLine("You have escaped the cave unscathed, Congratulations!");
}
{
else
Console.WriteLine("You attack the spider with your barehands!");
Console.WriteLine("You strike the spider with your fists and after a long tussle, you stun the spider long enough to stumble and run back to the entrance of the cave.");
Console.WriteLine("You have escaped the cave, but not without terrible injuries.");
}
}
}

8 changes: 8 additions & 0 deletions TextBasedGame/TextBasedGame.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.0</TargetFramework>
</PropertyGroup>

</Project>
28 changes: 28 additions & 0 deletions TicTacToe/.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/TicTacToe.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}"
}
,]
}
Loading