mirror of
https://github.com/simtactics/servo.git
synced 2025-03-15 00:21:20 +00:00
Moved max values and random to top
This commit is contained in:
parent
a2b5e3469f
commit
c5f5148a4d
1 changed files with 16 additions and 8 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue