Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created March 15, 2020 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/a3b94b39e09085d32d680fb1c8a01a28 to your computer and use it in GitHub Desktop.
Save codecademydev/a3b94b39e09085d32d680fb1c8a01a28 to your computer and use it in GitHub Desktop.
Codecademy export
using System;
namespace ExquisiteCorpse
{
class Program
{
static void Main(string[] args)
{
Console.Write("Would you like to create your own personal creature?");
Console.WriteLine();
string answer = Console.ReadLine();
if (answer == "yes" || answer == "Yes") {
//head
Console.WriteLine("All right! So, what type of head would you like your creature to have? (monster, ghost, bug)");
Console.WriteLine();
string answer_head = Console.ReadLine();
//body
Console.WriteLine("What type of body would you like your creature to have? (monster, ghost, bug)");
Console.WriteLine();
string answer_body = Console.ReadLine();
//feet
Console.WriteLine("What type of feet would you like your creature to have? (monster, ghost, bug)");
Console.WriteLine();
//building
string answer_feet = Console.ReadLine();
Console.WriteLine("Here is your personalized creature!");
BuildACreature(answer_head, answer_body, answer_feet);
} else {
Console.WriteLine("All right! Good bye then!)");
}
}
static void BuildACreature(string head, string body, string feet) {
//first switch
switch (head) {
case "monster":
MonsterHead();
break;
case "ghost":
GhostHead();
break;
case "bug":
BugHead();
break;
}
//second switch
switch (body) {
case "monster":
MonsterBody();
break;
case "ghost":
GhostBody();
break;
case "bug":
BugBody();
break;
}
//third switch
switch (feet) {
case "monster":
MonsterFeet();
break;
case "ghost":
GhostFeet();
break;
case "bug":
BugFeet();
break;
}
}
static void GhostHead()
{
Console.WriteLine(" ..-..");
Console.WriteLine(" ( o o )");
Console.WriteLine(" | O |");
}
static void GhostBody()
{
Console.WriteLine(" | |");
Console.WriteLine(" | |");
Console.WriteLine(" | |");
}
static void GhostFeet()
{
Console.WriteLine(" | |");
Console.WriteLine(" | |");
Console.WriteLine(" '~~~~~'");
}
static void BugHead()
{
Console.WriteLine(" / \\");
Console.WriteLine(" \\. ./");
Console.WriteLine(" (o + o)");
}
static void BugBody()
{
Console.WriteLine(" --| | |--");
Console.WriteLine(" --| | |--");
Console.WriteLine(" --| | |--");
}
static void BugFeet()
{
Console.WriteLine(" v v");
Console.WriteLine(" *****");
}
static void MonsterHead()
{
Console.WriteLine(" _____");
Console.WriteLine(" .-,;='';_),-.");
Console.WriteLine(" \\_\\(),()/_/");
Console.WriteLine("  (,___,)");
}
static void MonsterBody()
{
Console.WriteLine(" ,-/`~`\\-,___");
Console.WriteLine(" / /).:.('--._)");
Console.WriteLine(" {_[ (_,_)");
}
static void MonsterFeet()
{
Console.WriteLine(" | Y |");
Console.WriteLine(" / | \\");
Console.WriteLine(" \"\"\"\" \"\"\"\"");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment