summaryrefslogtreecommitdiffhomepage
path: root/samples/13_path_finding_algorithms/03_breadcrumbs
diff options
context:
space:
mode:
Diffstat (limited to 'samples/13_path_finding_algorithms/03_breadcrumbs')
-rw-r--r--samples/13_path_finding_algorithms/03_breadcrumbs/app/main.rb136
-rw-r--r--samples/13_path_finding_algorithms/03_breadcrumbs/replay.txt365
2 files changed, 433 insertions, 68 deletions
diff --git a/samples/13_path_finding_algorithms/03_breadcrumbs/app/main.rb b/samples/13_path_finding_algorithms/03_breadcrumbs/app/main.rb
index 648805a..533a962 100644
--- a/samples/13_path_finding_algorithms/03_breadcrumbs/app/main.rb
+++ b/samples/13_path_finding_algorithms/03_breadcrumbs/app/main.rb
@@ -12,8 +12,8 @@ class Breadcrumbs
calc
# Calc Path
end
- render
- input
+ render
+ input
end
def defaults
@@ -90,7 +90,7 @@ class Breadcrumbs
[24, 9] => true,
[25, 8] => true,
[25, 9] => true,
- }
+ }
# Variables that are used by the breadth first search
# Storing cells that the search has visited, prevents unnecessary steps
@@ -109,36 +109,36 @@ class Breadcrumbs
# We store this value, because we want to remember the value even when
# the user's cursor is no longer over what they're interacting with, but
# they are still clicking down on the mouse.
- state.current_input ||= :none
+ state.current_input ||= :none
end
def calc
# Setup the search to start from the star
- search.frontier << grid.star
+ search.frontier << grid.star
search.came_from[grid.star] = nil
# Until there are no more cells to expand from
- until search.frontier.empty?
+ until search.frontier.empty?
# Takes the next frontier cell
- new_frontier = search.frontier.shift
+ new_frontier = search.frontier.shift
# For each of its neighbors
- adjacent_neighbors(new_frontier).each do |neighbor|
+ adjacent_neighbors(new_frontier).each do |neighbor|
# That have not been visited and are not walls
- unless search.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor)
+ unless search.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor)
# Add them to the frontier and mark them as visited in the first grid
# Unless the target has been visited
# Add the neighbor to the frontier and remember which cell it came from
- search.frontier << neighbor
+ search.frontier << neighbor
search.came_from[neighbor] = new_frontier
end
end
end
end
-
+
# Draws everything onto the screen
def render
- render_background
+ render_background
# render_heat_map
render_walls
# render_path
@@ -157,7 +157,7 @@ class Breadcrumbs
if current_cell && parent_cell
outputs.lines << [(current_cell.x + 0.5) * grid.cell_size, (current_cell.y + 0.5) * grid.cell_size,
(parent_cell.x + 0.5) * grid.cell_size, (parent_cell.y + 0.5) * grid.cell_size, purple]
-
+
end
render_trail(parent_cell)
end
@@ -183,8 +183,8 @@ class Breadcrumbs
# Draws what the grid looks like with nothing on it
def render_background
- render_unvisited
- render_grid_lines
+ render_unvisited
+ render_grid_lines
end
# Draws both grids
@@ -199,7 +199,7 @@ class Breadcrumbs
end
for y in 0..grid.height
- outputs.lines << horizontal_line(y)
+ outputs.lines << horizontal_line(y)
end
end
@@ -215,7 +215,7 @@ class Breadcrumbs
# Draws the walls on both grids
def render_walls
- grid.walls.each_key do |wall|
+ grid.walls.each_key do |wall|
outputs.solids << [scale_up(wall), wall_color]
end
end
@@ -223,12 +223,12 @@ class Breadcrumbs
# Renders the star on both grids
def render_star
outputs.sprites << [scale_up(grid.star), 'star.png']
- end
+ end
# Renders the target on both grids
def render_target
outputs.sprites << [scale_up(grid.target), 'target.png']
- end
+ end
# Labels the grids
def render_labels
@@ -288,14 +288,14 @@ class Breadcrumbs
# The program has to remember that the user is dragging an object
# even when the mouse is no longer over that object
# So detecting input and processing input is separate
- # detect_input
- # process_input
+ # detect_input
+ # process_input
if inputs.mouse.up
state.current_input = :none
elsif star_clicked?
state.current_input = :star
end
-
+
if mouse_inside_grid?
unless grid.target == cell_closest_to_mouse
grid.target = cell_closest_to_mouse
@@ -313,33 +313,33 @@ class Breadcrumbs
# mouse left click is held
def detect_input
# When the mouse is up, nothing is being edited
- if inputs.mouse.up
- state.current_input = :none
+ if inputs.mouse.up
+ state.current_input = :none
# When the star in the no second grid is clicked
- elsif star_clicked?
- state.current_input = :star
+ elsif star_clicked?
+ state.current_input = :star
# When the target in the no second grid is clicked
- elsif target_clicked?
- state.current_input = :target
+ elsif target_clicked?
+ state.current_input = :target
# When a wall in the first grid is clicked
- elsif wall_clicked?
- state.current_input = :remove_wall
+ elsif wall_clicked?
+ state.current_input = :remove_wall
# When the first grid is clicked
- elsif grid_clicked?
+ elsif grid_clicked?
state.current_input = :add_wall
end
end
# Processes click and drag based on what the user is currently dragging
def process_input
- if state.current_input == :star
- input_star
- elsif state.current_input == :target
- input_target
- elsif state.current_input == :remove_wall
- input_remove_wall
- elsif state.current_input == :add_wall
- input_add_wall
+ if state.current_input == :star
+ input_star
+ elsif state.current_input == :target
+ input_target
+ elsif state.current_input == :remove_wall
+ input_remove_wall
+ elsif state.current_input == :add_wall
+ input_add_wall
end
end
@@ -347,10 +347,10 @@ class Breadcrumbs
# Only resets the search if the star changes position
# Called whenever the user is editing the star (puts mouse down on star)
def input_star
- old_star = grid.star.clone
+ old_star = grid.star.clone
grid.star = cell_closest_to_mouse
- unless old_star == grid.star
- reset_search
+ unless old_star == grid.star
+ reset_search
end
end
@@ -358,10 +358,10 @@ class Breadcrumbs
# Only reset_searchs the search if the target changes position
# Called whenever the user is editing the target (puts mouse down on target)
def input_target
- old_target = grid.target.clone
+ old_target = grid.target.clone
grid.target = cell_closest_to_mouse
- unless old_target == grid.target
- reset_search
+ unless old_target == grid.target
+ reset_search
end
end
@@ -370,32 +370,32 @@ class Breadcrumbs
# The mouse needs to be inside the grid, because we only want to remove walls
# the cursor is directly over
# Recalculations should only occur when a wall is actually deleted
- if mouse_inside_grid?
+ if mouse_inside_grid?
if grid.walls.has_key?(cell_closest_to_mouse)
- grid.walls.delete(cell_closest_to_mouse)
- reset_search
+ grid.walls.delete(cell_closest_to_mouse)
+ reset_search
end
end
end
# Adds a wall in the first grid in the cell the mouse is over
def input_add_wall
- if mouse_inside_grid?
+ if mouse_inside_grid?
unless grid.walls.has_key?(cell_closest_to_mouse)
- grid.walls[cell_closest_to_mouse] = true
- reset_search
+ grid.walls[cell_closest_to_mouse] = true
+ reset_search
end
end
end
-
+
# Whenever the user edits the grid,
# The search has to be reset_searchd upto the current step
# with the current grid as the initial state of the grid
def reset_search
# Reset_Searchs the search
- search.frontier = []
- search.came_from = {}
+ search.frontier = []
+ search.came_from = {}
search.path = {}
end
@@ -403,21 +403,21 @@ class Breadcrumbs
# Returns a list of adjacent cells
# Used to determine what the next cells to be added to the frontier are
def adjacent_neighbors(cell)
- neighbors = []
+ neighbors = []
# Gets all the valid neighbors into the array
# From southern neighbor, clockwise
- neighbors << [cell.x, cell.y - 1] unless cell.y == 0
- neighbors << [cell.x - 1, cell.y] unless cell.x == 0
- neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1
- neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1
+ neighbors << [cell.x, cell.y - 1] unless cell.y == 0
+ neighbors << [cell.x - 1, cell.y] unless cell.x == 0
+ neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1
+ neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1
# Sorts the neighbors so the rendered path is a zigzag path
# Cells in a diagonal direction are given priority
# Comment this line to see the difference
neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) }
- neighbors
+ neighbors
end
# Finds the vertical and horizontal distance of a cell from the star
@@ -442,13 +442,13 @@ class Breadcrumbs
# Finding the cell closest to the mouse helps with this
def cell_closest_to_mouse
# Closest cell to the mouse in the first grid
- x = (inputs.mouse.point.x / grid.cell_size).to_i
- y = (inputs.mouse.point.y / grid.cell_size).to_i
+ x = (inputs.mouse.point.x / grid.cell_size).to_i
+ y = (inputs.mouse.point.y / grid.cell_size).to_i
# Bound x and y to the grid
- x = grid.width - 1 if x > grid.width - 1
- y = grid.height - 1 if y > grid.height - 1
+ x = grid.width - 1 if x > grid.width - 1
+ y = grid.height - 1 if y > grid.height - 1
# Return closest cell
- [x, y]
+ [x, y]
end
# Signal that the user is going to be moving the star from the first grid
@@ -476,13 +476,13 @@ class Breadcrumbs
# Light brown
def unvisited_color
- [221, 212, 213]
+ [221, 212, 213]
# [255, 255, 255]
end
# Camo Green
def wall_color
- [134, 134, 120]
+ [134, 134, 120]
end
# Pastel White
@@ -520,7 +520,7 @@ def tick args
end
# Every tick, new args are passed, and the Breadth First Search tick is called
- $breadcrumbs ||= Breadcrumbs.new(args)
+ $breadcrumbs ||= Breadcrumbs.new
$breadcrumbs.args = args
$breadcrumbs.tick
end
diff --git a/samples/13_path_finding_algorithms/03_breadcrumbs/replay.txt b/samples/13_path_finding_algorithms/03_breadcrumbs/replay.txt
new file mode 100644
index 0000000..4e98cf7
--- /dev/null
+++ b/samples/13_path_finding_algorithms/03_breadcrumbs/replay.txt
@@ -0,0 +1,365 @@
+replay_version 2.0
+stopped_at 211
+seed 100
+recorded_at 2021-11-20 11:18:41 -0600
+[:mouse_button_up, 1, 0, 1, 1, 1]
+[:mouse_move, 778, 91, 2, 2, 7]
+[:mouse_move, 778, 90, 2, 3, 7]
+[:mouse_move, 773, 94, 2, 4, 10]
+[:mouse_move, 748, 101, 2, 5, 11]
+[:mouse_move, 704, 112, 2, 6, 11]
+[:mouse_move, 656, 127, 2, 7, 11]
+[:mouse_move, 617, 138, 2, 8, 12]
+[:mouse_move, 595, 142, 2, 9, 12]
+[:mouse_move, 582, 143, 2, 10, 13]
+[:mouse_move, 574, 143, 2, 11, 13]
+[:mouse_move, 561, 144, 2, 12, 13]
+[:mouse_move, 550, 148, 2, 13, 13]
+[:mouse_move, 536, 155, 2, 14, 14]
+[:mouse_move, 519, 162, 2, 15, 14]
+[:mouse_move, 497, 168, 2, 16, 14]
+[:mouse_move, 475, 174, 2, 17, 15]
+[:mouse_move, 450, 179, 2, 18, 15]
+[:mouse_move, 420, 188, 2, 19, 15]
+[:mouse_move, 385, 200, 2, 20, 16]
+[:mouse_move, 350, 219, 2, 21, 16]
+[:mouse_move, 317, 239, 2, 22, 16]
+[:mouse_move, 278, 272, 2, 23, 17]
+[:mouse_move, 251, 292, 2, 24, 17]
+[:mouse_move, 229, 314, 2, 25, 17]
+[:mouse_move, 213, 335, 2, 26, 18]
+[:mouse_move, 205, 355, 2, 27, 18]
+[:mouse_move, 201, 375, 2, 28, 19]
+[:mouse_move, 199, 394, 2, 29, 19]
+[:mouse_move, 199, 409, 2, 30, 20]
+[:mouse_move, 199, 419, 2, 31, 20]
+[:mouse_move, 198, 427, 2, 32, 20]
+[:mouse_move, 198, 434, 2, 33, 20]
+[:mouse_move, 198, 441, 2, 34, 21]
+[:mouse_move, 198, 453, 2, 35, 21]
+[:mouse_move, 197, 457, 2, 36, 21]
+[:mouse_move, 188, 464, 2, 37, 22]
+[:mouse_move, 178, 470, 2, 38, 22]
+[:mouse_move, 169, 477, 2, 39, 22]
+[:mouse_move, 161, 484, 2, 40, 23]
+[:mouse_move, 148, 491, 2, 41, 23]
+[:mouse_move, 128, 499, 2, 42, 24]
+[:mouse_move, 109, 509, 2, 43, 24]
+[:mouse_move, 94, 521, 2, 44, 25]
+[:mouse_move, 86, 530, 2, 45, 25]
+[:mouse_move, 80, 540, 2, 46, 25]
+[:mouse_move, 76, 550, 2, 47, 25]
+[:mouse_move, 76, 552, 2, 48, 26]
+[:mouse_move, 77, 555, 2, 49, 26]
+[:mouse_move, 78, 556, 2, 50, 27]
+[:mouse_move, 86, 560, 2, 51, 27]
+[:mouse_move, 99, 564, 2, 52, 27]
+[:mouse_move, 111, 568, 2, 53, 27]
+[:mouse_move, 125, 571, 2, 54, 28]
+[:mouse_move, 142, 572, 2, 55, 28]
+[:mouse_move, 164, 572, 2, 56, 29]
+[:mouse_move, 190, 572, 2, 57, 29]
+[:mouse_move, 215, 572, 2, 58, 29]
+[:mouse_move, 249, 568, 2, 59, 30]
+[:mouse_move, 271, 565, 2, 60, 30]
+[:mouse_move, 288, 563, 2, 61, 31]
+[:mouse_move, 303, 561, 2, 62, 31]
+[:mouse_move, 314, 559, 2, 63, 31]
+[:mouse_move, 323, 556, 2, 64, 31]
+[:mouse_move, 330, 553, 2, 65, 32]
+[:mouse_move, 335, 550, 2, 66, 32]
+[:mouse_move, 342, 547, 2, 67, 32]
+[:mouse_move, 351, 543, 2, 68, 33]
+[:mouse_move, 359, 538, 2, 69, 33]
+[:mouse_move, 370, 533, 2, 70, 34]
+[:mouse_move, 393, 521, 2, 71, 34]
+[:mouse_move, 412, 511, 2, 72, 34]
+[:mouse_move, 432, 503, 2, 73, 35]
+[:mouse_move, 451, 497, 2, 74, 35]
+[:mouse_move, 468, 493, 2, 75, 35]
+[:mouse_move, 479, 492, 2, 76, 36]
+[:mouse_move, 487, 490, 2, 77, 36]
+[:mouse_move, 494, 489, 2, 78, 37]
+[:mouse_move, 501, 489, 2, 79, 37]
+[:mouse_move, 506, 487, 2, 80, 37]
+[:mouse_move, 507, 487, 2, 81, 38]
+[:mouse_move, 508, 486, 2, 82, 38]
+[:mouse_move, 502, 486, 2, 83, 38]
+[:mouse_move, 500, 486, 2, 84, 39]
+[:mouse_move, 496, 487, 2, 85, 39]
+[:mouse_move, 491, 489, 2, 86, 40]
+[:mouse_move, 492, 489, 2, 87, 45]
+[:mouse_move, 499, 487, 2, 88, 46]
+[:mouse_move, 509, 484, 2, 89, 46]
+[:mouse_move, 526, 480, 2, 90, 46]
+[:mouse_move, 548, 475, 2, 91, 47]
+[:mouse_move, 580, 468, 2, 92, 47]
+[:mouse_move, 598, 465, 2, 93, 47]
+[:mouse_move, 615, 461, 2, 94, 48]
+[:mouse_move, 628, 459, 2, 95, 48]
+[:mouse_move, 636, 459, 2, 96, 49]
+[:mouse_move, 641, 459, 2, 97, 49]
+[:mouse_move, 645, 459, 2, 98, 49]
+[:mouse_move, 647, 459, 2, 99, 50]
+[:mouse_move, 648, 459, 2, 100, 50]
+[:mouse_move, 650, 459, 2, 101, 51]
+[:mouse_move, 651, 459, 2, 102, 51]
+[:mouse_move, 652, 459, 2, 103, 52]
+[:mouse_move, 655, 459, 2, 104, 52]
+[:mouse_move, 661, 459, 2, 105, 52]
+[:mouse_move, 667, 459, 2, 106, 53]
+[:mouse_move, 674, 459, 2, 107, 53]
+[:mouse_move, 680, 460, 2, 108, 54]
+[:mouse_move, 687, 461, 2, 109, 54]
+[:mouse_move, 695, 462, 2, 110, 54]
+[:mouse_move, 699, 463, 2, 111, 55]
+[:mouse_move, 700, 463, 2, 112, 55]
+[:mouse_move, 702, 463, 2, 113, 56]
+[:mouse_move, 705, 463, 2, 114, 56]
+[:mouse_move, 709, 464, 2, 115, 56]
+[:mouse_move, 714, 464, 2, 116, 57]
+[:mouse_move, 718, 464, 2, 117, 57]
+[:mouse_move, 721, 464, 2, 118, 57]
+[:mouse_move, 723, 464, 2, 119, 58]
+[:mouse_move, 726, 465, 2, 120, 58]
+[:mouse_move, 729, 465, 2, 121, 59]
+[:mouse_move, 731, 465, 2, 122, 59]
+[:mouse_move, 732, 465, 2, 123, 60]
+[:mouse_move, 733, 465, 2, 124, 61]
+[:mouse_move, 734, 465, 2, 125, 61]
+[:mouse_move, 737, 465, 2, 126, 61]
+[:mouse_move, 739, 465, 2, 127, 62]
+[:mouse_move, 743, 465, 2, 128, 62]
+[:mouse_move, 751, 467, 2, 129, 62]
+[:mouse_move, 761, 469, 2, 130, 63]
+[:mouse_move, 772, 469, 2, 131, 63]
+[:mouse_move, 782, 469, 2, 132, 63]
+[:mouse_move, 793, 471, 2, 133, 64]
+[:mouse_move, 808, 471, 2, 134, 64]
+[:mouse_move, 818, 472, 2, 135, 64]
+[:mouse_move, 829, 473, 2, 136, 65]
+[:mouse_move, 839, 475, 2, 137, 65]
+[:mouse_move, 849, 477, 2, 138, 66]
+[:mouse_move, 861, 479, 2, 139, 66]
+[:mouse_move, 876, 480, 2, 140, 66]
+[:mouse_move, 893, 480, 2, 141, 67]
+[:mouse_move, 912, 480, 2, 142, 67]
+[:mouse_move, 933, 482, 2, 143, 68]
+[:mouse_move, 952, 482, 2, 144, 68]
+[:mouse_move, 967, 482, 2, 145, 68]
+[:mouse_move, 983, 482, 2, 146, 68]
+[:mouse_move, 1007, 482, 2, 147, 69]
+[:mouse_move, 1021, 482, 2, 148, 69]
+[:mouse_move, 1031, 482, 2, 149, 70]
+[:mouse_move, 1041, 482, 2, 150, 70]
+[:mouse_move, 1045, 482, 2, 151, 71]
+[:mouse_move, 1049, 481, 2, 152, 71]
+[:mouse_move, 1052, 481, 2, 153, 71]
+[:mouse_move, 1053, 481, 2, 154, 71]
+[:mouse_move, 1054, 481, 2, 155, 72]
+[:mouse_move, 1055, 480, 2, 156, 73]
+[:mouse_move, 1057, 480, 2, 157, 73]
+[:mouse_move, 1060, 479, 2, 158, 74]
+[:mouse_move, 1062, 479, 2, 159, 74]
+[:mouse_move, 1063, 478, 2, 160, 75]
+[:mouse_move, 1064, 478, 2, 161, 75]
+[:mouse_move, 1065, 478, 2, 162, 77]
+[:mouse_move, 1066, 478, 2, 163, 77]
+[:mouse_move, 1067, 478, 2, 164, 78]
+[:mouse_move, 1069, 478, 2, 165, 83]
+[:mouse_move, 1074, 477, 2, 166, 84]
+[:mouse_move, 1082, 476, 2, 167, 84]
+[:mouse_move, 1093, 469, 2, 168, 85]
+[:mouse_move, 1106, 459, 2, 169, 85]
+[:mouse_move, 1117, 447, 2, 170, 85]
+[:mouse_move, 1125, 433, 2, 171, 85]
+[:mouse_move, 1130, 414, 2, 172, 85]
+[:mouse_move, 1130, 382, 2, 173, 86]
+[:mouse_move, 1127, 358, 2, 174, 86]
+[:mouse_move, 1119, 333, 2, 175, 87]
+[:mouse_move, 1109, 309, 2, 176, 87]
+[:mouse_move, 1102, 293, 2, 177, 87]
+[:mouse_move, 1094, 280, 2, 178, 88]
+[:mouse_move, 1089, 272, 2, 179, 88]
+[:mouse_move, 1087, 264, 2, 180, 89]
+[:mouse_move, 1086, 258, 2, 181, 89]
+[:mouse_move, 1086, 248, 2, 182, 89]
+[:mouse_move, 1084, 241, 2, 183, 89]
+[:mouse_move, 1084, 240, 2, 184, 90]
+[:mouse_button_pressed, 1, 0, 1, 185, 95]
+[:mouse_button_up, 1, 0, 1, 186, 97]
+[:mouse_move, 1086, 251, 2, 187, 105]
+[:mouse_move, 1086, 267, 2, 188, 105]
+[:mouse_move, 1087, 287, 2, 189, 106]
+[:mouse_move, 1087, 310, 2, 190, 106]
+[:mouse_move, 1087, 339, 2, 191, 107]
+[:mouse_move, 1078, 387, 2, 192, 107]
+[:mouse_move, 1064, 422, 2, 193, 107]
+[:mouse_move, 1050, 449, 2, 194, 108]
+[:mouse_move, 1033, 470, 2, 195, 108]
+[:mouse_move, 1015, 485, 2, 196, 108]
+[:mouse_move, 995, 494, 2, 197, 109]
+[:mouse_move, 973, 500, 2, 198, 109]
+[:mouse_move, 955, 505, 2, 199, 109]
+[:mouse_move, 936, 506, 2, 200, 110]
+[:mouse_move, 919, 510, 2, 201, 110]
+[:mouse_move, 906, 510, 2, 202, 110]
+[:mouse_move, 891, 513, 2, 203, 111]
+[:mouse_move, 873, 516, 2, 204, 111]
+[:mouse_move, 854, 520, 2, 205, 111]
+[:mouse_move, 843, 522, 2, 206, 112]
+[:mouse_move, 830, 525, 2, 207, 112]
+[:mouse_move, 816, 526, 2, 208, 112]
+[:mouse_move, 804, 527, 2, 209, 113]
+[:mouse_move, 794, 527, 2, 210, 113]
+[:mouse_move, 784, 527, 2, 211, 114]
+[:mouse_move, 775, 526, 2, 212, 114]
+[:mouse_move, 765, 522, 2, 213, 114]
+[:mouse_move, 755, 518, 2, 214, 115]
+[:mouse_move, 746, 513, 2, 215, 115]
+[:mouse_move, 732, 505, 2, 216, 116]
+[:mouse_move, 706, 483, 2, 217, 116]
+[:mouse_move, 694, 463, 2, 218, 116]
+[:mouse_move, 689, 446, 2, 219, 116]
+[:mouse_move, 689, 429, 2, 220, 117]
+[:mouse_move, 689, 409, 2, 221, 117]
+[:mouse_move, 689, 388, 2, 222, 118]
+[:mouse_move, 689, 361, 2, 223, 118]
+[:mouse_move, 683, 327, 2, 224, 119]
+[:mouse_move, 677, 295, 2, 225, 119]
+[:mouse_move, 666, 266, 2, 226, 119]
+[:mouse_move, 656, 245, 2, 227, 119]
+[:mouse_move, 650, 233, 2, 228, 120]
+[:mouse_move, 640, 215, 2, 229, 120]
+[:mouse_move, 630, 203, 2, 230, 121]
+[:mouse_move, 612, 189, 2, 231, 121]
+[:mouse_move, 586, 178, 2, 232, 121]
+[:mouse_move, 553, 168, 2, 233, 121]
+[:mouse_move, 528, 166, 2, 234, 122]
+[:mouse_move, 510, 165, 2, 235, 122]
+[:mouse_move, 498, 165, 2, 236, 123]
+[:mouse_move, 482, 165, 2, 237, 123]
+[:mouse_move, 466, 165, 2, 238, 123]
+[:mouse_move, 450, 165, 2, 239, 124]
+[:mouse_move, 426, 165, 2, 240, 124]
+[:mouse_move, 416, 165, 2, 241, 125]
+[:mouse_move, 411, 166, 2, 242, 125]
+[:mouse_move, 407, 168, 2, 243, 126]
+[:mouse_move, 405, 169, 2, 244, 126]
+[:mouse_move, 400, 172, 2, 245, 126]
+[:mouse_move, 391, 178, 2, 246, 126]
+[:mouse_move, 381, 185, 2, 247, 127]
+[:mouse_move, 368, 195, 2, 248, 127]
+[:mouse_move, 355, 207, 2, 249, 128]
+[:mouse_move, 345, 223, 2, 250, 128]
+[:mouse_move, 343, 243, 2, 251, 128]
+[:mouse_move, 343, 273, 2, 252, 129]
+[:mouse_move, 343, 290, 2, 253, 129]
+[:mouse_move, 343, 308, 2, 254, 129]
+[:mouse_move, 342, 326, 2, 255, 130]
+[:mouse_move, 340, 343, 2, 256, 130]
+[:mouse_move, 339, 363, 2, 257, 130]
+[:mouse_move, 339, 384, 2, 258, 131]
+[:mouse_move, 339, 407, 2, 259, 131]
+[:mouse_move, 338, 427, 2, 260, 132]
+[:mouse_move, 333, 446, 2, 261, 132]
+[:mouse_move, 330, 463, 2, 262, 132]
+[:mouse_move, 325, 477, 2, 263, 133]
+[:mouse_move, 317, 488, 2, 264, 133]
+[:mouse_move, 313, 494, 2, 265, 133]
+[:mouse_move, 308, 500, 2, 266, 134]
+[:mouse_move, 302, 511, 2, 267, 134]
+[:mouse_move, 295, 522, 2, 268, 135]
+[:mouse_move, 285, 535, 2, 269, 135]
+[:mouse_move, 277, 547, 2, 270, 135]
+[:mouse_move, 267, 558, 2, 271, 136]
+[:mouse_move, 259, 568, 2, 272, 136]
+[:mouse_move, 250, 574, 2, 273, 137]
+[:mouse_move, 241, 580, 2, 274, 137]
+[:mouse_move, 233, 586, 2, 275, 137]
+[:mouse_move, 222, 593, 2, 276, 138]
+[:mouse_move, 213, 599, 2, 277, 138]
+[:mouse_move, 206, 606, 2, 278, 138]
+[:mouse_move, 203, 615, 2, 279, 139]
+[:mouse_move, 202, 622, 2, 280, 139]
+[:mouse_move, 200, 625, 2, 281, 139]
+[:mouse_move, 199, 627, 2, 282, 140]
+[:mouse_move, 198, 628, 2, 283, 140]
+[:mouse_move, 197, 628, 2, 284, 141]
+[:mouse_move, 194, 630, 2, 285, 141]
+[:mouse_move, 190, 632, 2, 286, 141]
+[:mouse_move, 186, 633, 2, 287, 142]
+[:mouse_move, 180, 635, 2, 288, 142]
+[:mouse_move, 175, 636, 2, 289, 143]
+[:mouse_move, 174, 636, 2, 290, 144]
+[:mouse_move, 173, 636, 2, 291, 144]
+[:mouse_move, 170, 636, 2, 292, 144]
+[:mouse_move, 164, 636, 2, 293, 144]
+[:mouse_move, 155, 636, 2, 294, 145]
+[:mouse_move, 147, 634, 2, 295, 145]
+[:mouse_move, 141, 634, 2, 296, 146]
+[:mouse_move, 139, 634, 2, 297, 146]
+[:mouse_move, 138, 634, 2, 298, 146]
+[:mouse_move, 136, 634, 2, 299, 147]
+[:mouse_move, 135, 633, 2, 300, 148]
+[:mouse_move, 134, 633, 2, 301, 148]
+[:mouse_move, 133, 633, 2, 302, 148]
+[:key_down_raw, 96, 0, 2, 303, 159]
+[:mouse_move, 134, 632, 2, 304, 160]
+[:mouse_move, 138, 632, 2, 305, 161]
+[:key_up_raw, 96, 0, 2, 306, 161]
+[:mouse_move, 144, 630, 2, 307, 161]
+[:mouse_move, 155, 628, 2, 308, 161]
+[:mouse_move, 170, 623, 2, 309, 161]
+[:mouse_move, 189, 618, 2, 310, 161]
+[:mouse_move, 213, 611, 2, 311, 162]
+[:mouse_move, 243, 600, 2, 312, 162]
+[:mouse_move, 281, 586, 2, 313, 163]
+[:mouse_move, 330, 565, 2, 314, 163]
+[:mouse_move, 400, 533, 2, 315, 163]
+[:mouse_move, 476, 492, 2, 316, 164]
+[:mouse_move, 564, 445, 2, 317, 164]
+[:mouse_move, 703, 362, 2, 318, 164]
+[:mouse_move, 797, 306, 2, 319, 165]
+[:mouse_move, 872, 251, 2, 320, 165]
+[:mouse_move, 951, 196, 2, 321, 165]
+[:mouse_move, 1012, 147, 2, 322, 166]
+[:mouse_move, 1058, 112, 2, 323, 166]
+[:mouse_move, 1085, 87, 2, 324, 166]
+[:mouse_move, 1100, 67, 2, 325, 166]
+[:mouse_move, 1111, 51, 2, 326, 167]
+[:mouse_move, 1117, 42, 2, 327, 167]
+[:mouse_move, 1118, 39, 2, 328, 168]
+[:mouse_move, 1110, 35, 2, 329, 170]
+[:mouse_move, 1101, 34, 2, 330, 171]
+[:mouse_move, 1095, 34, 2, 331, 171]
+[:mouse_move, 1087, 34, 2, 332, 171]
+[:mouse_move, 1076, 34, 2, 333, 172]
+[:mouse_move, 1064, 34, 2, 334, 172]
+[:mouse_move, 1045, 38, 2, 335, 172]
+[:mouse_move, 1031, 42, 2, 336, 172]
+[:mouse_move, 1018, 45, 2, 337, 173]
+[:mouse_move, 1002, 50, 2, 338, 173]
+[:mouse_move, 978, 53, 2, 339, 173]
+[:mouse_move, 947, 54, 2, 340, 174]
+[:mouse_move, 908, 54, 2, 341, 174]
+[:mouse_move, 864, 54, 2, 342, 174]
+[:mouse_move, 830, 54, 2, 343, 174]
+[:mouse_move, 810, 58, 2, 344, 175]
+[:mouse_move, 807, 59, 2, 345, 175]
+[:mouse_move, 808, 59, 2, 346, 177]
+[:mouse_move, 810, 61, 2, 347, 178]
+[:mouse_move, 814, 65, 2, 348, 178]
+[:mouse_move, 816, 66, 2, 349, 178]
+[:mouse_move, 818, 69, 2, 350, 178]
+[:mouse_move, 819, 71, 2, 351, 179]
+[:mouse_move, 820, 73, 2, 352, 179]
+[:mouse_move, 820, 74, 2, 353, 179]
+[:mouse_move, 819, 75, 2, 354, 183]
+[:mouse_move, 817, 77, 2, 355, 183]
+[:mouse_move, 814, 81, 2, 356, 184]
+[:mouse_move, 810, 84, 2, 357, 184]
+[:mouse_move, 809, 85, 2, 358, 184]
+[:mouse_move, 810, 85, 2, 359, 211]
+[:key_down_raw, 13, 0, 2, 360, 211]
+[:mouse_move, 811, 85, 2, 361, 211]