From 9d74a1690e7b41c95a14c5a0236d239d054fe34a Mon Sep 17 00:00:00 2001 From: Anthony Leland Date: Wed, 28 Oct 2020 21:57:03 -0400 Subject: [PATCH] Increased max mood and motive, resepctfully. - Function for printing motives and mood --- motives.ipynb | 74 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 31 deletions(-) diff --git a/motives.ipynb b/motives.ipynb index bbd6292..87277a2 100644 --- a/motives.ipynb +++ b/motives.ipynb @@ -23,21 +23,14 @@ ], "outputs": [] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "For this experiment, the current motives are randomized with a max of 10. If this were a game, the max would be 100 with a downward increment throughout the day." - ] - }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "source": [ "static Random rng = new Random();\n", - "static int MaxMood = 60;\n", - "static int MaxMotive = 10;\n", + "static int MaxMood = 600;\n", + "static int MaxMotive = 100;\n", "\n", "static int LimitToRange(this int val, int min, int max)\n", "{\n", @@ -133,6 +126,16 @@ " {\n", " Social = CalcuateMotiveChange(Social, input);\n", " }\n", + "\n", + " public void ChangeEnergy(int input)\n", + " {\n", + " Energy = CalcuateMotiveChange(Energy, input);\n", + " }\n", + "\n", + " public void ChangeEnvironment(int input)\n", + " {\n", + " Environment = CalcuateMotiveChange(Environment, input);\n", + " }\n", "}" ], "outputs": [] @@ -142,19 +145,15 @@ "execution_count": 1, "metadata": {}, "source": [ - "// Max a motive can be is 10. With all motives combined, the\n", - "// the max can be about 60. In-game, this is always going down\n", - "// to whatever degree.\n", - "var motives = new Motives(hunger: rng.Next(MaxMotive), \n", - "bladder: rng.Next(MaxMotive), fun: rng.Next(MaxMotive), \n", - "energy: rng.Next(MaxMotive), environment: MaxMotive, \n", - "social: rng.Next(MaxMotive));\n", - "Console.WriteLine($\"Hunger: {motives.Hunger}{Environment.NewLine}\" +\n", - " $\"Fun: {motives.Fun}{Environment.NewLine}\" +\n", - " $\"Bladder: {motives.Bladder}{Environment.NewLine}\" +\n", - " $\"Social: {motives.Social}{Environment.NewLine}\" +\n", - " $\"Environment: {motives.Environment}\");\n", - "Console.WriteLine($\"Mood: {motives.Mood}\");" + "void PrintMotives(Motives motives)\n", + "{\n", + " Console.WriteLine($\"Hunger: {motives.Hunger}{Environment.NewLine}\" +\n", + " $\"Fun: {motives.Fun}{Environment.NewLine}\" +\n", + " $\"Bladder: {motives.Bladder}{Environment.NewLine}\" +\n", + " $\"Social: {motives.Social}{Environment.NewLine}\" +\n", + " $\"Environment: {motives.Environment}\");\n", + " Console.WriteLine($\"Mood: {motives.Mood}\");\n", + "}" ], "outputs": [] }, @@ -163,15 +162,28 @@ "execution_count": 1, "metadata": {}, "source": [ - "motives.ChangeHunger(rng.Next(MaxMotive));\n", - "motives.ChangeFun(rng.Next(MaxMotive));\n", - "motives.ChangeSocial(rng.Next(MaxMotive));\n", - "motives.ChangeBladder(rng.Next(MaxMotive));\n", - "Console.WriteLine($\"New Hunger: {motives.Hunger}{Environment.NewLine}\" +\n", - " $\"New Fun: {motives.Fun}{Environment.NewLine}\" +\n", - " $\"New Bladder: {motives.Bladder}{Environment.NewLine}\" +\n", - " $\"New Social: {motives.Social}\");\n", - "Console.WriteLine($\"New Mood: {motives.Mood}\");" + "var motives = new Motives(hunger: rng.Next(MaxMotive), \n", + "bladder: rng.Next(MaxMotive), fun: rng.Next(MaxMotive), \n", + "energy: rng.Next(MaxMotive), environment: rng.Next(MaxMotive), \n", + "social: rng.Next(MaxMotive));\n", + "\n", + "PrintMotives(motives);" + ], + "outputs": [] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "source": [ + "motives.ChangeHunger(rng.Next(motives.Hunger, MaxMotive));\n", + "motives.ChangeFun(rng.Next(motives.Fun, MaxMotive));\n", + "motives.ChangeSocial(rng.Next(motives.Social, MaxMotive));\n", + "motives.ChangeBladder(rng.Next(motives.Bladder, MaxMotive));\n", + "motives.ChangeEnergy(rng.Next(motives.Energy, MaxMotive));\n", + "motives.ChangeEnvironment(rng.Next(motives.Environment, MaxMotive));\n", + "\n", + "PrintMotives(motives);" ], "outputs": [] }