
Push Direction is a Stack Chip used to manipulate the direction information in your ChipWit’s program. It plays a crucial role in managing how your ChipWit navigates and interacts with its environment.
Specifications #
- Argument: Direction (Forward, Backward, Left, Right), Register
- Creates a True or False Branch?: No, Push Direction does not create a T/F branch
- Number of Cycles Used: 1
- Fuel: 1
What is Push Direction? #
- Purpose: Push Direction stores the current direction of your ChipWit onto the stack. This allows you to save the direction and use it later in your program for various decisions or actions.
- Function: When you use Push Direction, it captures the ChipWit’s current facing direction and pushes this information onto the stack. This direction data can then be retrieved or used later with other stack operations.
How to Use Push Direction #
- Placement: Drag and drop the Push Direction chip from the Radial Workshop Menu into the Workshop’s grid at the desired position in your program sequence.
- Execution: When the program reaches the Push Direction chip, it pushes the ChipWit’s current direction (e.g., Forward, Backward, Right, Left) onto the stack.
- Retrieval: To use the direction data later, you can combine Push Direction with other stack chips such as Pop or If Direction Equals. This allows you to retrieve the saved direction and make decisions based on it.
Push Direction commands the ChipWit to put a specified move (the Argument) into the Move Stack. This is the way the ChipWit makes the list of moves that constitutes the Move Stack.
Why Push Direction Matters #
- Directional Control: Push Direction helps in creating complex programs where direction-based decisions or actions are needed. By saving and reusing direction data, you can build more sophisticated and responsive behaviors for your ChipWit.
- Program Flexibility: Storing direction data allows you to manage your ChipWit’s orientation effectively, making it easier to create programs that adapt to different situations or navigate challenging layouts.
Push Direction is a valuable tool for handling directional data within your ChipWit’s program, enabling more precise and adaptable control over movement and decision-making.
History #
“Push Direction” as it appears in various historic incarnations of ChipWits!
COMMODORE 64:
MANUAL:
“In one game, your CHIPWIT may need to remember the moves it has made since entering a room to quickly return to a door. So to enable each CHIPWIT to easily store, retrieve, and manipulate Numbers, Moves, and Things, each has been provided with three “pockets,” called Stacks.”
APPLE II:
MANUAL:
“SAVE MOVE commands the ChipWit to put a specified move (the Argument of the SAVE MOVE chip) into the Move Stack. This is the way the ChipWit makes the list of moves that constitutes the Move stack. Uses of the Move stack are discussed in Chapter II.
The Arguments for SAVE MOVE are the four directional move arrows.”
MAC:
MANUAL:
“SAVE MOVE commands the ChipWit to put a specified move (the Argument) into the Move Stack. This is the way the ChipWit makes the list of moves that constitutes the Move Stack. Uses of the Move Stack are discussed in Chapter II. The Arguments for SAVE MOVE arc the four directional move arrows.”
CHIPWITS II (WIN 95):