Game Development Reference
5. Drag the tiny box on the right side to the left to make the control small
enough to fit under the label.
6. Change the Name property of NumericUpDown to AmbientUpDown.
7. The default value of 0 for the Minimum property and 100 for the Maximum
property do not need to be changed for a thermostat using the Fahrenheit
scale. If you use Centigrade, change the Minimum property to 15 and the
Maximum property to 45.
8. Similarly drag a NumericUpDown control below the Set Point label and
rename it SetPointUpDown.
9. Resize SetPointUpDown and optionally change the Minimum and Max-
10. Drag a Label control below the Status label.
11. Change the Label control's Name property to StatusLabel and its Text
property to Undefined.
12. Change its BackColor property to White and the BorderStyle property to
FixedSingle. Note that when you go to change the color, there will be three
tabs showing: System, Web, and Custom. The default tab is System, and
White is not listed as an option in the drop-down for that tab. Instead,
White is listed in the Web tab, along with many common color names. You
can pick it from the drop-down for the Web tab or you can simply type over
the existing color with the name of the color that you want. Your project
should resemble Figure 2.2.
13. We are ready to add the code. We will put the AI code in a separate file to
help differentiate between the world simulation and the AI. Right-click the
Thermostat project in the Solution Explorer, choose Add, and choose
You could also add the module by opening the Project menu and choosing Add Module.
14. The Add New Item dialog box opens with the filename highlighted at the
bottom. Change the name to AI.vb and click Add.