Basic Play

Keys do the following:

  1. Go to root of the BST
  2. Go to the left child
  3. Go to the right child
  4. Add new item as left child
  5. Add new item as right child

Control

  1. Reset the game
  1. Toggle on/off a threshold setting of 3

This simulates single-user interaction using an i>Clicker. In a classroom situation multiple students could play in a team where a majority would need to agree on each move by clicking the appropriate button.

Source code: BST

Built with Processing

Click on the white background to start the gamelet.

Instructions: Your goal is to insert a sequence of items into the BST using the operations listed on the left. The item to be inserted is shown in the blue box next to the root. The "current node" is shown in green. The trail of nodes visited on the way to the current node is shown in magenta. Type "a" to start at the root of the BST, then navigate from there by either typing "b" to go to the left child or "c" to go to the right child. Type 'd' to insert the new item as the left child of a leaf, type 'e' to insert the new item as the right child of the leaf. The nodes should appear in order at the end.

To begin, click on the applet window (above) to start, then type keys to simulate i>Clicker key presses.

For multi-game competition, use UPPER CASE characters for the right game and regular lower case for the left game. If two keyboards are available, one keyboard can be used for each game.

To simulate team-base play, toggle thresholding to be “on” using the 't' key so that three matching key presses are required to initiate an operation. In a classroom situation this would mean that the students had reached a consensus on the next move.