From 22ccbc69489756f1a828cdaaa384170c89a54656 Mon Sep 17 00:00:00 2001 From: DeMarco Date: Sat, 6 Oct 2018 11:01:55 -0500 Subject: [PATCH 1/6] finished week1 practice --- Week1-Practice/Program.cs | 51 ++++++++++++++++++++++++++++ Week1-Practice/Week1-Practice.csproj | 9 +++++ 2 files changed, 60 insertions(+) create mode 100644 Week1-Practice/Program.cs create mode 100644 Week1-Practice/Week1-Practice.csproj diff --git a/Week1-Practice/Program.cs b/Week1-Practice/Program.cs new file mode 100644 index 00000000..f5903523 --- /dev/null +++ b/Week1-Practice/Program.cs @@ -0,0 +1,51 @@ +using System; + +namespace Week1_Practice +{ + class Program + { + static void Main(string[] args) + { + int input1 = 0; + int input2 = 0; + + Console.WriteLine("Give me a number between 0 and 100:"); + input1 = Convert.ToInt32(Console.ReadLine()); + Console.WriteLine("Give me another number between 0 and 100:"); + input2 = Convert.ToInt32(Console.ReadLine()); + + Console.WriteLine(input1 + input2); + + int yardLength = 0; + int inchLength = 0; + Console.WriteLine("Give me a number of yards?"); + yardLength = Convert.ToInt32(Console.ReadLine()); + inchLength = (yardLength * 36); + + Console.WriteLine("You have {0} inches!", inchLength); + + bool people = true; + bool f = false; + decimal numb = 0.0M; + + + string firstName = "DeMarco"; + string lastName = "Spears"; + int age = 27; + string job = "Client Support Agent"; + string favoriteBand = "Beetles"; + string favoriteSportsTeam = "Golden State Warriors"; + + + Console.WriteLine("Give me a decimal number?"); + numb = Convert.ToDecimal(Console.ReadLine()); + Console.WriteLine(numb * numb); + Console.WriteLine("I love sports my favorite team is the {0}", favoriteSportsTeam); + Console.WriteLine("My birthday is on the forth of July, I'm {0} years old!", age); + Console.WriteLine("My favorite band of all time is the {0}!", favoriteBand); + Console.WriteLine("I work at Dell as a {0}!", job); + + } + } + +} diff --git a/Week1-Practice/Week1-Practice.csproj b/Week1-Practice/Week1-Practice.csproj new file mode 100644 index 00000000..b8c2678e --- /dev/null +++ b/Week1-Practice/Week1-Practice.csproj @@ -0,0 +1,9 @@ + + + + Exe + netcoreapp2.1 + Week1_Practice + + + From d8271b9287dcc7b28b64eb2e2553a3a1f71b1782 Mon Sep 17 00:00:00 2001 From: DeMarco Date: Sun, 7 Oct 2018 22:18:07 -0500 Subject: [PATCH 2/6] textgame file added --- TextGame/TextGame.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 TextGame/TextGame.cs diff --git a/TextGame/TextGame.cs b/TextGame/TextGame.cs new file mode 100644 index 00000000..cb26e2c1 --- /dev/null +++ b/TextGame/TextGame.cs @@ -0,0 +1,18 @@ +musing System; +using threading; + +namespace TextGame +{ + + class Program + { + + public void Main(string[] args) + { + Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); + Console.WriteLine("Welcome to the cavern of secrets!"); + Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); + + } + } +} \ No newline at end of file From e11262739c429c1abcd0b6091fac436f01ebbb42 Mon Sep 17 00:00:00 2001 From: DeMarco Date: Sun, 7 Oct 2018 22:22:14 -0500 Subject: [PATCH 3/6] file renamed --- TextGame/{TextGame.cs => Program.cs} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename TextGame/{TextGame.cs => Program.cs} (94%) diff --git a/TextGame/TextGame.cs b/TextGame/Program.cs similarity index 94% rename from TextGame/TextGame.cs rename to TextGame/Program.cs index cb26e2c1..2ad6914c 100644 --- a/TextGame/TextGame.cs +++ b/TextGame/Program.cs @@ -1,5 +1,5 @@ musing System; -using threading; +// using threading; namespace TextGame { From 2efd24f79bc6e2d9e43a8d53fcb47161e25369a9 Mon Sep 17 00:00:00 2001 From: DeMarco Date: Mon, 8 Oct 2018 00:01:06 -0500 Subject: [PATCH 4/6] 1st attempt text game --- TextGame/Program.cs | 58 +++++++++++++++++++++++++++++++++++++--- TextGame/textgame.csproj | 8 ++++++ 2 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 TextGame/textgame.csproj diff --git a/TextGame/Program.cs b/TextGame/Program.cs index 2ad6914c..f36f44f5 100644 --- a/TextGame/Program.cs +++ b/TextGame/Program.cs @@ -1,5 +1,5 @@ -musing System; -// using threading; +using System; +using System.Threading; namespace TextGame { @@ -7,12 +7,62 @@ namespace TextGame class Program { - public void Main(string[] args) + static void Main(string[] args) { Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); Console.WriteLine("Welcome to the cavern of secrets!"); Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); + Thread.Sleep(1000); + Console.WriteLine("You enter a dark cavern out of curiosity. It is dark and you can only make out a small stick on the floor."); + Console.WriteLine("Do you take it? [y/n]: "); + string ch1 = Console.ReadLine(); + string ch2 = Console.ReadLine(); + string ch3 = Console.ReadLine(); + + int stick = 0; + if (ch1 == "y") + { + Console.WriteLine("You have taken the stick!"); + Thread.Sleep(2000); + stick = 1; + } + else + { + Console.WriteLine("You did not take the stick"); + stick = 0; + Console.WriteLine("As you proceed further into the cave, you see a small glowing object"); + + } + if (ch2 == "y") + { + Console.WriteLine("You approach the object..."); + Thread.Sleep(2000); + Console.WriteLine("As you draw closer, you begin to make out the object as an eye!"); + Thread.Sleep(2000); + Console.WriteLine("The eye belongs to a giant spider!"); + Console.WriteLine("Do you try to fight it? [Y/N]"); + } + if (ch3 == "y") + { + if (stick == 1) + Console.WriteLine("You only have a stick to fight with!"); + Console.WriteLine("You quickly jab the spider in it's eye and gain an advantage"); + Thread.Sleep(2000); + Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); + Console.WriteLine(" Fighting... "); + Console.WriteLine(" YOU MUST HIT ABOVE A 5 TO KILL THE SPIDER "); + Console.WriteLine("IF THE SPIDER HITS HIGHER THAN YOU, YOU WILL DIE"); + Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); + Thread.Sleep(2000); + // Random random = new Random(); + // int fdmg1 = Random.Next(3, 10); + // int edmg1 = Random.Next(1, 5); + Console.WriteLine("you hit a"); + Console.WriteLine("the spider hits a"); + Thread.Sleep(2000); + } + } } -} \ No newline at end of file +} diff --git a/TextGame/textgame.csproj b/TextGame/textgame.csproj new file mode 100644 index 00000000..23df6047 --- /dev/null +++ b/TextGame/textgame.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp2.1 + + + From ff1c62b4b12f48870fcd03309b0a8c72004e15db Mon Sep 17 00:00:00 2001 From: DeMarco Date: Tue, 9 Oct 2018 22:04:21 -0500 Subject: [PATCH 5/6] updated text game --- TextGame/Program.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/TextGame/Program.cs b/TextGame/Program.cs index f36f44f5..eb04b169 100644 --- a/TextGame/Program.cs +++ b/TextGame/Program.cs @@ -54,9 +54,10 @@ static void Main(string[] args) Console.WriteLine("IF THE SPIDER HITS HIGHER THAN YOU, YOU WILL DIE"); Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); Thread.Sleep(2000); - // Random random = new Random(); - // int fdmg1 = Random.Next(3, 10); - // int edmg1 = Random.Next(1, 5); + // Random randomNub = new Random(); + // int fdmg1 = Random.Next(3, 11); + // int edmg1 = Random.Next(1, 6); + //the random number gen will not display properly- im getting an error message Console.WriteLine("you hit a"); Console.WriteLine("the spider hits a"); Thread.Sleep(2000); From 2e1cf1d48176b71a68260763db6dc084f3d3895f Mon Sep 17 00:00:00 2001 From: DeMarco Date: Wed, 10 Oct 2018 17:31:26 -0500 Subject: [PATCH 6/6] 1st draft piglatin --- PigLatin/PigLatin.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PigLatin/PigLatin.cs b/PigLatin/PigLatin.cs index 702647dd..ee556947 100644 --- a/PigLatin/PigLatin.cs +++ b/PigLatin/PigLatin.cs @@ -7,7 +7,9 @@ class Program public static void Main() { // your code goes here - + String userInput = ""; + Console.WriteLine("Enter a word:") + Console.ReadLine(); // leave this command at the end so your program does not close automatically Console.ReadLine(); } @@ -15,6 +17,7 @@ public static void Main() public static string TranslateWord(string word) { // your code goes here + userInput = Console.ReadLine(); return word; } }