samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb
def input
    # Processes inputs for the buttons
    input_buttons

    # Detects which if any click and drag input is occurring
    detect_click_and_drag          

    # Does the appropriate click and drag input based on the click_and_drag variable
    process_click_and_drag         
  end
# This method processes user input every tick
# This method allows the user to use the buttons, slider, and edit the grid
# There are 2 types of input:
#   Button Input
#   Click and Drag Input
#
#   Button Input is used for the backward step and forward step buttons
#   Input is detected by mouse up within the bounds of the rect
#
#   Click and Drag Input is used for moving the star, adding walls,
#   removing walls, and the slider
#
#   When the mouse is down on the star, the click_and_drag variable is set to :star
#   While click_and_drag equals :star, the cursor's position is used to calculate the
#   appropriate drag behavior
#
#   When the mouse goes up click_and_drag is set to :none
#
#   A variable has to be used because the star has to continue being edited even
#   when the cursor is no longer over the star
#
#   Similar things occur for the other Click and Drag inputs
This method processes user input every tick
This method allows the user to use the buttons, slider, and edit the grid
There are 2 types of input:
Button Input
Click and Drag Input

Button Input is used for the backward step and forward step buttons
Input is detected by mouse up within the bounds of the rect

Click and Drag Input is used for moving the star, adding walls,
removing walls, and the slider

When the mouse is down on the star, the click_and_drag variable is set to :star
While click_and_drag equals :star, the cursor's position is used to calculate the
appropriate drag behavior

When the mouse goes up click_and_drag is set to :none

A variable has to be used because the star has to continue being edited even
when the cursor is no longer over the star

Similar things occur for the other Click and Drag inputs
This method processes user input every tick This method allows the user to use the buttons slider and edit the grid There are 2 types of input : Button Input Click and Drag Input Button Input is used for the backward step and forward step buttons Input is detected by mouse up within the bounds of the rect Click and Drag Input is used for moving the star adding walls removing walls and the slider When the mouse is down on the star the click_and_drag variable is set to : star While click_and_drag equals : star the cursor ' s position is used to calculate the appropriate drag behavior When the mouse goes up click_and_drag is set to : none A variable has to be used because the star has to continue being edited even when the cursor is no longer over the star Similar things occur for the other Click and Drag inputs
def input
    input_buttons
    detect_click_and_drag          
    process_click_and_drag         
  end
def input input_buttons detect_click_and_drag process_click_and_drag end
This method processes user input every tick
This method allows the user to use the buttons, slider, and edit the grid
There are 2 types of input:
Button Input
Click and Drag Input
This method processes user input every tick This method allows the user to use the buttons slider and edit the grid There are 2 types of input : Button Input Click and Drag Input
# Processes inputs for the buttons # Detects which if any click and drag input is occurring # Does the appropriate click and drag input based on the click_and_drag variable