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