
The Increment chip adds 1 to adds one to the number at the top of the stack, making it a useful tool for counting or tracking progress, such as how many items your ChipWit has collected.
Specifications #
- Arguments: None
- Creates a True or False Branch?: No, Increment does not create a True/False branch.
- Number of Cycles Used: 1
- Fuel: 1
Example of Use #
Let’s say you want your ChipWit to count how many pies it picks up while navigating a room:
- Set Up a Number Register:
- First, use the Memory Stack to hold the count of Pies. Initialize the Memory Stack to 0 by using a chip like Push Number to start the count.
- Use the Increment Chip:
- Each time your ChipWit picks up a Pie, place an Increment chip after the Pickup chip to add 1 to the Memory Stack.
- Check or Use the Count:
- As your ChipWit navigates and picks up pies, the Increment chip tracks how many pies have been collected. Later in the program, you can use an If Number Equals chip to compare the count with a target number (e.g., 5 pies). If the count reaches the target, the ChipWit can move to a new location or complete the mission.
The Increment chip helps keep track of repetitive actions and adds flexibility to your ChipWit’s programming.
PLEASE NOTE: Numbers increase from zero to seven and then wrap around (return) to zero.
History #
“Increment” as it appears in various historic incarnations of ChipWits!
COMMODORE 64:
MANUAL:
“Increment adds one to the number on top of the Number Stack. Decrement subtracts one from the number at the top of the Number Stack. However, if an attempt is made to increment the top of the Number Stack beyond seven, it “rolls around’ and becomes a zero.”
APPLE II:
MANUAL:
“INCREMENT increases the value at the top of the Number Stack by one. Numbers increase from zero to seven and then wrap around (return) to zero. There must be a value in the Number Stack in order to INCREMENT.”
MAC:
MANUAL:
“INCREMENT increases the value at the top of the Number Stack by one. Numbers increase from zero to seven and then wrap around (return) to zero. There must be a value in the Number Stack to be iNCREMENTed.”
CHIPWITS II (WINDOWS 95):