Moved max values and random to top

This commit is contained in:
Anthony Leland 2020-10-28 20:57:06 -04:00
parent a2b5e3469f
commit c5f5148a4d

View file

@ -23,6 +23,16 @@
], ],
"outputs": [] "outputs": []
}, },
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"source": [
"var rng = new Random();\n",
"var MaxMood = 60;"
],
"outputs": []
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": 1,
@ -62,8 +72,6 @@
" public int Environment { get; set; }\n", " public int Environment { get; set; }\n",
" public int Social { get; set; }\n", " public int Social { get; set; }\n",
"\n", "\n",
" int MaxMood = 60;\n",
"\n",
" /// <summary>\n", " /// <summary>\n",
" /// The mood is the sum of all the motives.\n", " /// The mood is the sum of all the motives.\n",
" /// It deteremines the best course of action.\n", " /// It deteremines the best course of action.\n",
@ -92,7 +100,7 @@
"\n", "\n",
" // New mood equals the new motive plus the current mood\n", " // New mood equals the new motive plus the current mood\n",
" var newMood = newMotive + curMood;\n", " var newMood = newMotive + curMood;\n",
" \n", "\n",
" // Changed motive is the new motive with the limit\n", " // Changed motive is the new motive with the limit\n",
" var changedMotive = newMotive.LimitToRange(0, maxMotive);\n", " var changedMotive = newMotive.LimitToRange(0, maxMotive);\n",
"\n", "\n",
@ -120,13 +128,13 @@
"outputs": [] "outputs": []
}, },
{ {
"cell_type": "code", "cell_type": "markdown",
"execution_count": 1,
"metadata": {}, "metadata": {},
"source": [ "source": [
"var rng = new Random();" "# Set the motives\n",
], "\n",
"outputs": [] "For this experiement we use an "
]
}, },
{ {
"cell_type": "code", "cell_type": "code",