TutorialsCocktail Shaker Sort

Appendix F — Glossary

One word for each idea, used the same way everywhere in the game and in this book.

Board
The square where the pieces lie.
Command
The word a Puzzle Button placement is given (Reset, Shuffle, Step, Sort, Upload, Lesson): which Request Function Button Action runs.
Comparison
The computer reads two neighboring slots and decides.
Computer
The automatic sort.
Cursor
The left slot of the computer’s next comparison.
Exchange
The player trades the pieces of any two slots. Counted in Moves.
Focus
The slot the keyboard is on.
gridSize
Pieces in one row: 3, 5 or 8.
Home
The slot whose number equals a piece’s ID. A piece “is home” there.
Lesson Panel
The “How it works” panel over the game.
Lesson Panel Controls
The Input Context of Close Panel (F, Escape); on only while the Lesson Panel is open.
Mode
One of the ways an Event can run; Switch Mode chooses it.
Outline
The colored square behind each piece.
Pass
One sweep of comparisons in one direction: forward (reading order) or backward.
Picture
The whole image being rebuilt: Village, Forest, Harbor, or an uploaded one.
Piece
One square cut of the picture. Its ID is its home slot and its frame in the sliced picture.
Piece count
How many pieces the board holds: 9, 25 or 64.
Player
The person playing.
Preview
The small whole picture beside the board.
Puzzle Controls
The Input Context of every key of the puzzle; on while the Lesson Panel is closed.
Selection
The first piece chosen, waiting for the second.
Settled
A slot outside the unsorted range: its piece is final.
Slide
The short movement of two exchanged or swapped pieces.
Slot
A fixed place on the board, numbered 0 to count-1 in reading order (the player sees 1 to count). One row of Board Slots.
Solved
The Game State once every piece is home; message “Picture complete.”
Speed
Slow, Steady or Fast: how quickly Sort makes comparisons.
Starting arrangement
The order Reset goes back to; Shuffle makes a new one.
Swap
The computer trades two neighboring pieces that were out of order.
Unsorted range
Slots rangeStart to rangeEnd still being sorted.
Upload
The player choosing a picture of their own from a file; it becomes the Pictures row Uploaded for the session.