added back + exit functionality for creach addition
This commit is contained in:
parent
7c692f0369
commit
ffde3b80d7
7 changed files with 23 additions and 37 deletions
24
Program.cs
24
Program.cs
|
@ -35,7 +35,7 @@ namespace creachopedia {
|
||||||
case "add":
|
case "add":
|
||||||
switch (substatus) {
|
switch (substatus) {
|
||||||
case 1:
|
case 1:
|
||||||
Console.WriteLine("Please enter a name for the creacher! Or type (b) for previous category, or (q) to cancel addition entirely.");
|
Console.WriteLine("Please enter a name for the creacher! Or type (x) to cancel and step back to the previous category, or (q) to cancel addition entirely.");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Console.WriteLine("How many footsies? 0u0 (numerals only plz)");
|
Console.WriteLine("How many footsies? 0u0 (numerals only plz)");
|
||||||
|
@ -59,11 +59,11 @@ namespace creachopedia {
|
||||||
string userin = Console.ReadLine();
|
string userin = Console.ReadLine();
|
||||||
string luserin = userin.ToLower();
|
string luserin = userin.ToLower();
|
||||||
|
|
||||||
|
if (status == "base") {
|
||||||
if (luserin == "q" || luserin == "quit") {
|
if (luserin == "q" || luserin == "quit") {
|
||||||
Console.WriteLine("Thank you for using the CreachoPedia, please come again!!!!");
|
Console.WriteLine("Thank you for using the CreachoPedia, please come again!!!!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (status == "base") {
|
|
||||||
if (creacherdict.ContainsKey(userin)) {
|
if (creacherdict.ContainsKey(userin)) {
|
||||||
creacherdict[userin].Introduce();
|
creacherdict[userin].Introduce();
|
||||||
creacherdict[userin].Step();
|
creacherdict[userin].Step();
|
||||||
|
@ -82,7 +82,19 @@ namespace creachopedia {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (status == "add") {
|
else if (status == "add") {
|
||||||
if (substatus == 1) {
|
if (luserin == "x") {
|
||||||
|
substatus--;
|
||||||
|
luserin = "";
|
||||||
|
}
|
||||||
|
else if (luserin == "q") {
|
||||||
|
status = "base";
|
||||||
|
}
|
||||||
|
else if (substatus == 0) {
|
||||||
|
status = "base";
|
||||||
|
substatus = 1;
|
||||||
|
Console.WriteLine("please hit enter to continue");
|
||||||
|
}
|
||||||
|
else if (substatus == 1) {
|
||||||
tempdict = new Dictionary<string, string>();
|
tempdict = new Dictionary<string, string>();
|
||||||
var namematcher = new Regex(@"[^ ].[A-Za-z\- ]{2,}(?<! )");
|
var namematcher = new Regex(@"[^ ].[A-Za-z\- ]{2,}(?<! )");
|
||||||
if (namematcher.Match(userin).Success) {
|
if (namematcher.Match(userin).Success) {
|
||||||
|
@ -141,9 +153,9 @@ namespace creachopedia {
|
||||||
status = "base";
|
status = "base";
|
||||||
substatus = 1;
|
substatus = 1;
|
||||||
}
|
}
|
||||||
foreach (var i in tempdict) {
|
// foreach (var i in tempdict) {
|
||||||
Console.WriteLine("{0}:{1}", i.Key, i.Value);
|
// Console.WriteLine("{0}:{1}", i.Key, i.Value);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
Console.WriteLine("");
|
Console.WriteLine("");
|
||||||
|
|
Binary file not shown.
Binary file not shown.
20
json.bak
20
json.bak
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
"paca": {
|
|
||||||
"$type": "creachopedia.GroundCreacher, creachopedia",
|
|
||||||
"type": "creacher of the land",
|
|
||||||
"name": "paca",
|
|
||||||
"_footsies": 4
|
|
||||||
},
|
|
||||||
"llama": {
|
|
||||||
"$type": "creachopedia.GroundCreacher, creachopedia",
|
|
||||||
"type": "creacher of the land",
|
|
||||||
"name": "llama",
|
|
||||||
"_footsies": 4
|
|
||||||
},
|
|
||||||
"stingray": {
|
|
||||||
"$type": "creachopedia.WaterCreacher, creachopedia",
|
|
||||||
"type": "creacher of the water",
|
|
||||||
"name": "stingray",
|
|
||||||
"_footsies": 0
|
|
||||||
}
|
|
||||||
}
|
|
8
note.txt
8
note.txt
|
@ -1,10 +1,4 @@
|
||||||
name, footsycount, biome, locomotion, surfacerel,
|
|
||||||
|
|
||||||
|
|
||||||
None, Walker, Swimmer, Hopper, Flier, Slitherer, Incher
|
|
||||||
|
|
||||||
|
|
||||||
FOR NEXT VERSION:
|
FOR NEXT VERSION:
|
||||||
- individuals/species distinction
|
- individuals/species distinction
|
||||||
- ability to add individuals without a previously-created species by creating them together
|
- ability to add individuals without a previously-created species by creating them together
|
||||||
- maybe get rid of Newtonsoft JSON stuff- polymorphism no longer necessary w/ sunsetting of inheritance
|
- fix "creacher of the urban" and such formatting issues
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue