using System.Collections.Generic;
public static readonly Random rnd = new Random();
public double motivation;
public double workStats(int i)
List<double> WorkStats = new List<double>{};
public void work(List<Cat> CatList)
this.energy += workStats(2) * workEnergyCalc();
this.money += workStats(3) * workMoneyCalc();
foreach (Cat cat in CatList)
cat.energy += workStats(0);
cat.food += workStats(1);
public double workEnergyCalc()
double motDiv = motivation / 10;
double multiplier = 1.25 - (motDiv / 2);
public double workMoneyCalc()
double motDiv = motivation / 10;
double multiplier = 0.5 + (motDiv * 7);
public double getWorkStats(int i)
List<double> WorkStats = new List<double>{};
WorkStats.Add(this.workStats(0));
WorkStats.Add(this.workStats(1));
WorkStats.Add(this.workStats(2));
WorkStats.Add(this.workStats(3));
double info = WorkStats[i];
public double feedStats(int i)
List<double> FeedStats = new List<double>{};
public void feed(Cat cat)
cat.energy += this.feedStats(0);
cat.food += feedStats(1);
Console.WriteLine("You dont have enough money!");
public void feedAll(List<Cat> CatList)
if (money > (CatList.Count * 2))
for (int k = 0; k < CatList.Count; k++)
CatList[k].energy += feedStats(0);
CatList[k].food += feedStats(1);
Console.WriteLine("You dont have enough money!");
public string getFeedStats(int i)
List<double> feedStats = new List<double>{};
feedStats.Add(this.feedStats(0));
feedStats.Add(this.feedStats(1));
feedStats.Add(this.feedStats(2));
string info = feedStats[i].ToString();
public double petStats(int i)
List<double> PetStats = new List<double>{};
cat.happiness += petStats(0);
public string getPetStats(int i)
List<double> PetStats = new List<double>{};
PetStats.Add(this.petStats(0));
string info = PetStats[i].ToString();
public double playStats(int i)
List<double> PlayStats = new List<double>{};
public void play(Cat cat)
cat.happiness += playStats(0);
cat.food += playStats(1);
cat.energy += playStats(2);
motivation += playStats(4);
public void playAll(List<Cat> CatList)
if (energy > (CatList.Count * 10))
for (int k = 0; k < CatList.Count; k++)
CatList[k].happiness += 0.15;
public string getPlayStats(int i)
List<double> playStats = new List<double>{};
playStats.Add(this.playStats(0));
playStats.Add(this.playStats(1));
playStats.Add(this.playStats(2));
playStats.Add(this.playStats(3));
playStats.Add(this.playStats(4));
string info = playStats[i].ToString();
public double sleepStats(int i)
List<double> SleepStats = new List<double>{};
public void sleep(List<Cat> CatList)
foreach (Cat cat in CatList)
cat.energy += sleepStats(1);
cat.food += sleepStats(2);
public string getSleepStats(int i)
List<double> SleepStats = new List<double>{};
SleepStats.Add(this.sleepStats(0));
SleepStats.Add(this.sleepStats(1));
SleepStats.Add(this.sleepStats(2));
string info = SleepStats[i].ToString();
public double energy = 45;
public double happiness = 2.25;
Console.WriteLine(this.name + "MEOW");
Console.WriteLine("Sratch");
Console.WriteLine(this.name + " Died!");
public Cat(string x, string y)
public static void AdamsCatsGame()
Console.WriteLine("-------------------------------------------------");
Console.WriteLine(" Choose your name. ");
Console.WriteLine("-------------------------------------------------");
string c = Console.ReadLine();
Player player1 = new Player(c);
List<Player> PlayerList = new List<Player>{};
List<Cat> CatList = new List<Cat>();
string UIPlayer = string.Format("|{0,-7}|Money:{1,-8}|Energy:{2,-5}|Motivation:{3,-4}|Day:{4, -4}", player1.name, player1.money.ToString("C")+ "|", Math.Floor(player1.energy), Math.Floor(player1.motivation), Math.Floor(dayCounter) + " |");
for (int j = 3; j <= UIPlayer.Length; j++)
Console.WriteLine(UIPlayer);
for (int j = 3; j <= UIPlayer.Length; j++)
for (int k = 0; k < CatList.Count; k++)
Console.WriteLine(string.Format("|{0,-8}|Energy:{1,-4}|Food:{2,-4}|Happiness:{3,-7}|Age:{4,-3} |", CatList[k].name, CatList[k].energy, Math.Floor(CatList[k].food), CatList[k].happiness, Math.Floor(CatList[k].age)));
for (int j = 3; j <= UIPlayer.Length; j++)
Console.WriteLine("What would you like to do? Type \"help\" for a list of commands, or \"info\" for stats.");
if (c.ToLower() == "help")
Console.WriteLine("List of commands:");
Console.WriteLine("Pet");
Console.WriteLine("Sleep");
Console.WriteLine("Feed");
Console.WriteLine("Play");
Console.WriteLine("Work");
if (player1.motivation > 5)
Console.WriteLine("Buy");
if (c.ToLower() == "info")
Console.WriteLine("Which command would you like more information about?");
if (c.ToLower() == "feed")
Console.WriteLine(string.Format("Cat Energy: {0,-3} Cat Food: {1,-3} Player Money: {2,-3}", player1.getFeedStats(0), player1.getFeedStats(1), player1.getFeedStats(2)));
else if (c.ToLower() == "pet")
Console.WriteLine(string.Format("Cat Energy: {0,-3}", player1.getPetStats(0)));
else if (c.ToLower() == "play")
Console.WriteLine(string.Format("Cat Energy: {0,-3} Cat Food: {1,-3} Cat Happiness: {2,-3} Player Energy: {2,-3} Player Energy: {3,-3} Player Motivation {4,-3}", player1.getPlayStats(2), player1.getPlayStats(1), player1.getPlayStats(0), player1.getPlayStats(3), player1.getPlayStats(4)));
else if (c.ToLower() == "sleep")
Console.WriteLine(string.Format("Cat Energy: {0,-3} Cat Food: {1,-3} Player Energy: {2,-3}", player1.getSleepStats(1), player1.getSleepStats(2), player1.getSleepStats(0)));
else if (c.ToLower() == "work")
Console.WriteLine(string.Format("Work info - Cat Energy: {0,-3} Cat Food: {1,-3} Player Energy: {2,-3} Player Money: {3 -3}", player1.getWorkStats(0).ToString(), player1.getWorkStats(1).ToString(), player1.getWorkStats(2).ToString(), player1.getWorkStats(3).ToString()));
Console.WriteLine("What would you like to do? Type \"help\" for a list of commands, or \"info\" for stats.");
if (c.ToLower() == "pet")
Console.WriteLine("Who would you like to pet?");
string to = Console.ReadLine();
for (int k = 0; k < CatList.Count; k++)
if (CatList[k].name.ToLower() == to.ToLower())
else if (c.ToLower() == "sleep")
else if (c.ToLower() == "feed")
Console.WriteLine("Who would you like to feed?");
string to = Console.ReadLine();
if (to.ToLower() == "all")
player1.feedAll(CatList);
for (int k = 0; k < CatList.Count; k++)
if (CatList.Count() == 1)
player1.feed(CatList[0]);
else if (CatList[k].name.ToLower() == to.ToLower())
player1.feed(CatList[k]);
else if (c.ToLower() == "play")
Console.WriteLine("Who would you like to play with?");
string to = Console.ReadLine();
if (to.ToLower() == "all")
player1.playAll(CatList);
for (int k = 0; k < CatList.Count; k++)
if (CatList[k].name.ToLower() == to.ToLower())
player1.play(CatList[k]);
else if (c.ToLower() == "work")
if (player1.energy >= Math.Abs(player1.getWorkStats(2)))
Console.WriteLine("You need more energy!");
else if (c.ToLower() == "buy")
Console.WriteLine("What colour should the cat be?");
string cc = Console.ReadLine();
Console.WriteLine("What would you like to name the cat?");
string ccc = Console.ReadLine();
Cat x2 = new Cat(ccc, cc);
Console.WriteLine("You need at least $50!");
Console.WriteLine("Restarting...");
Console.WriteLine("Thanks for playing!");
for (int k = 0; k < CatList.Count; k++)
if (CatList[k].food < 1 || CatList[k].food > 150 || CatList[k].energy < 1 || CatList[k].thirst < 1)
CatList.Remove(CatList[k]);
for (int k = 0; k < CatList.Count(); k++)
if (CatList[k].energy > 100)
if (CatList[k].happiness > 10)
CatList[k].happiness = 10;
if (CatList[k].thirst > 70)
if (player1.energy > 100)
if (player1.motivation < 0)
if (player1.motivation > 10)
dayCounter += counter / 24;
for (int k = 0; k < CatList.Count(); k++)
CatList[k].age += (0.05 * counter);
for (int k = 0; k < CatList.Count(); k++)
CatList[k].food -= (2.5 * counter);
if (player1.motivation > 5)
player1.motivation -= (0.05 * counter);
if (CatList.Count == 0 && dayCounter > 3)
player1.motivation -= (0.05 * counter);
for (int i = 0; i < CatList.Count; i++)
if (CatList[i].happiness >= 9.5)
player1.motivation += (0.05 * counter);
else if (CatList[i].happiness >= 8)
player1.motivation += (0.03 * counter);
else if (CatList[i].happiness >= 6.5)
player1.motivation += (0.015 * counter);
else if (CatList[i].happiness >= 5)
player1.motivation += (0.01 * counter);
else if (CatList[i].happiness >= 3.5)
player1.motivation += (0.005 * counter);
public static void AdamsCatsMenu()
Console.WriteLine("---------------------------------------------------");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| 1.Play! |");
Console.WriteLine("| ------- |");
Console.WriteLine("| 2.Help |");
Console.WriteLine("| ------ |");
Console.WriteLine("| 3.Options |");
Console.WriteLine("| --------- |");
Console.WriteLine("| 4.Exit |");
Console.WriteLine("| ------ |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("---------------------------------------------------");
string selection = Console.ReadLine().ToString();
if (selection.ToString() == "1")
else if (selection.ToString() == "2")
Console.WriteLine("---------------------------------------------------");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| Try keeping each cat well fed |");
Console.WriteLine("| ----------------------------- |");
Console.WriteLine("| and make sure to give your cats |");
Console.WriteLine("| ------------------------------- |");
Console.WriteLine("| as well as yourself enough sleep |");
Console.WriteLine("| -------------------------------- |");
Console.WriteLine("| balance your time working and playing |");
Console.WriteLine("| ------------------------------------- |");
Console.WriteLine("| with your cats. 1.Return |");
Console.WriteLine("| ---------------- |");
Console.WriteLine("| |");
Console.WriteLine("---------------------------------------------------");
string selection2 = Console.ReadLine().ToString();
if (selection2.ToString() == "1")
else if (selection.ToString() == "3")
Console.WriteLine("---------------------------------------------------");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| Place Holder |");
Console.WriteLine("| ------------ |");
Console.WriteLine("| 1.Return |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("---------------------------------------------------");
string selection3 = Console.ReadLine().ToString();
if (selection3.ToString() == "1")
else if (selection.ToString() == "4")
Console.WriteLine("---------------------------------------------------");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| Bye! |");
Console.WriteLine("| ------ |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("---------------------------------------------------");
Console.WriteLine("---------------------------------------------------");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| Choose from the selection |");
Console.WriteLine("| -------------------------- |");
Console.WriteLine("| using keys 1 - 4 and pressing |");
Console.WriteLine("| ----------------------------- |");
Console.WriteLine("| enter. |");
Console.WriteLine("| ------- |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("| |");
Console.WriteLine("---------------------------------------------------");
public static void Main()