Terrain Color/es: Difference between revisions
(Created page with "<section begin=image/> alt=Terrain color|thumb <section end=image/> <section begin="name" />'''<code>terrain color</code>'''<section end="name" /> is a code block part of the Ambiente drawer.") |
(Updating to match new version of source page) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<section begin=image/> | <section begin=image/> | ||
[[File: | [[File:ColorTerreno.png|alt=Terrain color|thumb]] | ||
<section end=image/> | <section end=image/> | ||
<section begin="name" />'''<code>terrain color</code>'''<section end="name" /> is a [[code block]] part of the [[ | <section begin="name" />'''<code>terrain color</code>'''<section end="name" /> is a [[Special:MyLanguage/code block|bloque de código]] part of the [[Special:MyLanguage/Environment|ambiente]] drawer. | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
<section begin="name" />'''<code>terrain color</code>'''<section end="name" /> is a [[code block]] part of the [[Environment]] drawer. | |||
< | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
===Syntax | ==Usage== | ||
<code>terrain color</code> refers to the color of the terrain that the [[agent]] is currently on. | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Syntax== | |||
</div> | </div> | ||
Line 23: | Line 27: | ||
This is commonly used as part of a conditional statement: for example, if an agent's color matches the color of the terrain, then the agent should perform a certain action. | This is commonly used as part of a conditional statement: for example, if an agent's color matches the color of the terrain, then the agent should perform a certain action. | ||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Example== | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
[[File:terrain_color_example.gif|alt=Terrain Color example gif|thumb]] | |||
[[File:terrain_color_example.png|alt=Terrain Color example code|thumb]] | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
This is a model of a quarantine. Doctors (pink cubes) find sick agents roaming around the unquarantined area (green terrain) and move them to the quarantine (white terrain). Further, they also remove immune agents (blue) from the quarantine and move them to the unquarantined area. Note that movement from the unquarantined area to the quarantined area changes the trait quarantined? from 0 to 1. | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
The blocks shown above describe the procedure that ensures quarantined agents remain on white terrain and unquarantined agents remain on green terrain. If this condition is violated, the procedure bounce is called to move the agents back into its correct position. | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> |
Latest revision as of 06:11, 13 August 2023
terrain color
is a bloque de código part of the ambiente drawer.
terrain color
is a code block part of the Environment drawer.
Usage
terrain color
refers to the color of the terrain that the agent is currently on.
Syntax
[Textbox Insert] terrain color
Common Uses
This is commonly used as part of a conditional statement: for example, if an agent's color matches the color of the terrain, then the agent should perform a certain action.
Example
This is a model of a quarantine. Doctors (pink cubes) find sick agents roaming around the unquarantined area (green terrain) and move them to the quarantine (white terrain). Further, they also remove immune agents (blue) from the quarantine and move them to the unquarantined area. Note that movement from the unquarantined area to the quarantined area changes the trait quarantined? from 0 to 1.
The blocks shown above describe the procedure that ensures quarantined agents remain on white terrain and unquarantined agents remain on green terrain. If this condition is violated, the procedure bounce is called to move the agents back into its correct position.